@Doclassif0

Не запускается проект python django?

Запускаю проект python в docker
в итоге не понимаю что за ошибка и что он от меня хочет

Watching for file changes with StatReloader

Exception in thread django-main-thread:

Traceback (most recent call last):

  File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 244, in create

    app_module = import_module(app_name)

  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

  File "<frozen importlib._bootstrap>", line 983, in _find_and_load

  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'api'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner

    self.run()

  File "/usr/local/lib/python3.7/threading.py", line 870, in run

    self._target(*self._args, **self._kwargs)

  File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 64, in wrapper

    fn(*args, **kwargs)

  File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run

    autoreload.raise_last_exception()

  File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception

    raise _exception[1]

  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute

    autoreload.check_errors(django.setup)()

  File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 64, in wrapper

    fn(*args, **kwargs)

  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup

    apps.populate(settings.INSTALLED_APPS)

  File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 91, in populate

    app_config = AppConfig.create(entry)

  File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 250, in create

    app_config_class.__qualname__,

django.core.exceptions.ImproperlyConfigured: Cannot import 'api'. Check that 'backend.api.apps.AppConfig.name' is correct.
  • Вопрос задан
  • 838 просмотров
Решения вопроса 1
sergey-gornostaev
@sergey-gornostaev Куратор тега Django
Седой и строгий
В INSTALLED_APPS есть приложение по имени api, но такого нет в каталоге проекта или других путях импорта.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы