D
D
Doclassif02021-12-05 19:22:52
Django
Doclassif0, 2021-12-05 19:22:52

python django project not starting?

I start a python project in docker
, in the end I don’t understand what the error is and what he wants from me

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.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-12-05
@Doclassif0

There is an app named api in INSTALLED_APPS, but there is no such app in the project directory or other import paths.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question