Opened 3 years ago

Last modified 10 days ago

#32915 new Bug

./manage runserver --nostatic still doesn't return a traceback

Reported by: Michael Owned by:
Component: Core (Management commands) Version: 3.2
Severity: Normal Keywords:
Cc: bcail, Ülgen Sarıkavak Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

Maybe its regression, related to: https://code.djangoproject.com/ticket/27522:

> python manage.py runserver --nostatic
usage: manage.py runserver [-h] [--ipv6] [--nothreading] [--noreload] [--version] [-v {0,1,2,3}] [--settings SETTINGS]
                           [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color]
                           [addrport]
manage.py runserver: error: unrecognized arguments: --nostatic
> python manage.py runserver
python manage.py runserver
Traceback (most recent call last):
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 61, in execute
    super().execute(*args, **options)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 68, in handle
    if not settings.DEBUG and not settings.ALLOWED_HOSTS:
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'dist.plug.settings'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 16, in <module>
    execute_from_command_line(sys.argv)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/core/management/base.py", line 367, in run_from_argv
    connections.close_all()
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/db/utils.py", line 208, in close_all
    for alias in self:
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/utils/connection.py", line 73, in __iter__
    return iter(self.settings)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/utils/connection.py", line 45, in settings
    self._settings = self.configure_settings(self._settings)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/db/utils.py", line 144, in configure_settings
    databases = super().configure_settings(databases)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/utils/connection.py", line 50, in configure_settings
    settings = getattr(django_settings, self.settings_name)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/michael/venv/project/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'dist.plug.settings'

Its a ligit error, just hidden by --nostatic

Change History (15)

comment:1 by Mariusz Felisiak, 3 years ago

Description: modified (diff)
Triage Stage: UnreviewedAccepted

Thanks for the report!

Bisected to c6864a01b25591d3a709da8071413b69c9e35341.

comment:2 by Rohith P R, 3 years ago

Owner: changed from nobody to Rohith P R
Status: newassigned

comment:3 by Rohith P R, 3 years ago

Has patch: set
Last edited 3 years ago by Mariusz Felisiak (previous) (diff)

comment:4 by Mariusz Felisiak, 3 years ago

Patch needs improvement: set

comment:5 by Rohith P R, 3 years ago

Patch needs improvement: unset

comment:6 by Mariusz Felisiak, 3 years ago

Patch needs improvement: set

comment:7 by Rohith P R, 3 years ago

Patch needs improvement: unset

comment:8 by Mariusz Felisiak, 3 years ago

Needs tests: set
Patch needs improvement: set

It's WIP

comment:9 by Rohith P R, 2 years ago

Patch needs improvement: unset

comment:10 by Mariusz Felisiak, 2 years ago

Patch needs improvement: set

comment:11 by Rohith P R, 2 years ago

Owner: Rohith P R removed
Status: assignednew

comment:12 by bcail, 16 months ago

Cc: bcail added
Needs tests: unset
Owner: set to bcail
Patch needs improvement: unset
Status: newassigned

Opened a new PR from the previous one: https://github.com/django/django/pull/16337

comment:13 by Mariusz Felisiak, 14 months ago

Patch needs improvement: set

comment:14 by bcail, 4 weeks ago

Owner: bcail removed
Status: assignednew

comment:15 by Ülgen Sarıkavak, 10 days ago

Cc: Ülgen Sarıkavak added
Note: See TracTickets for help on using tickets.
Back to Top