vendredi 1 janvier 2021

My development server report this error after running it

My django project reports an error after running the development server:

I get this error each time I run the development server:
Virtual environment was activated before running the server. How do I resolve it and get my project working again?

    Watching for file changes with StatReloader
    Exception in thread django-main-thread:
    Traceback (most recent call last):
      File "c:\users\bello\anaconda3\lib\threading.py", line 916, in _bootstrap_inner
        self.run()
      File "c:\users\bello\anaconda3\lib\threading.py", line 864, in run
        self._target(*self._args, **self._kwargs)
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
        fn(*args, **kwargs)
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run
        autoreload.raise_last_exception()
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception
        raise _exception[1]
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\core\management\__init__.py", line 357, in execute
        autoreload.check_errors(django.setup)()
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
        fn(*args, **kwargs)
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\__init__.py", line 24, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\apps\registry.py", line 114, in populate
        app_config.import_models()
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\apps\config.py", line 211, in import_models
        self.models_module = import_module(models_module_name)
      File "c:\users\bello\anaconda3\lib\importlib\__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "C:\Users\bello\Desktop\DESKTOP\EDX\mosque-around-you\mosque-around-you\mosquesinlocation\models.py", line 3, in <module>
        from cities_light.models import City, Region as State, Country
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\cities_light\models.py", line 83, in <module>
        from .abstract_models import (AbstractCountry, AbstractRegion,
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\cities_light\abstract_models.py", line 5, in <module>
        import autoslug
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\autoslug\__init__.py", line 11, in <module>
        from autoslug.fields import AutoSlugField
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\autoslug\fields.py", line 29, in <module>
        from autoslug.settings import slugify, autoslug_modeltranslation_enable
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\autoslug\settings.py", line 68, in <module>
        slugify = get_callable(slugify_function_path)
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\django\urls\utils.py", line 28, in get_callable
        mod = import_module(mod_name)
      File "c:\users\bello\anaconda3\lib\importlib\__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "C:\Users\bello\Envs\mosque-around-you\lib\site-packages\autoslug\utils.py", line 15, in <module>
        from django.db.models.fields import FieldDoesNotExist, DateField
    ImportError: cannot import name 'FieldDoesNotExist'




Aucun commentaire:

Enregistrer un commentaire