[Django] #25523: manage.py runserver ignores logging configuration error and shows wrong exception

16 views
Skip to first unread message

Django

unread,
Oct 7, 2015, 8:07:05 AM10/7/15
to django-...@googlegroups.com
#25523: manage.py runserver ignores logging configuration error and shows wrong
exception
--------------------------------------------+--------------------
Reporter: coldmind | Owner: nobody
Type: Bug | Status: new
Component: Core (Management commands) | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------------+--------------------
While trying to `manage.py runserver`, when `LOGGING` contains some error
(e.g. log folder is missing, or `version` key is not included to logging
configuration dict), runserver internals is catching actual exception and
simply passing, and shows wrong error:


{{{
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
}}}

Here is a problem:

{{{

def setup():
"""
Configure the settings (this happens as a side effect of accessing the
first setting), configure logging and populate the app registry.
"""
...

configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) # <-
exception from here is ignored
apps.populate(settings.INSTALLED_APPS) # <- this shows exception, but
should show exception about logging
}}}

Tested on master and 1.8.
1.7 works as expected

--
Ticket URL: <https://code.djangoproject.com/ticket/25523>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 7, 2015, 8:15:36 AM10/7/15
to django-...@googlegroups.com
#25523: manage.py runserver ignores logging configuration error and shows wrong
exception
-------------------------------------+-------------------------------------

Reporter: coldmind | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: 1.8
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Might be a duplicate of #25510 -- could you test with that patch and if it
doesn't work, bisect to the commit where the behavior changed?

--
Ticket URL: <https://code.djangoproject.com/ticket/25523#comment:1>

Django

unread,
Oct 7, 2015, 8:58:57 AM10/7/15
to django-...@googlegroups.com
#25523: manage.py runserver ignores logging configuration error and shows wrong
exception
-------------------------------------+-------------------------------------
Reporter: coldmind | Owner: nobody
Type: Bug | Status: closed

Component: Core (Management | Version: 1.8
commands) |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by coldmind):

* status: new => closed
* resolution: => duplicate


Comment:

Patch from #25510 works for me, closing as duplicate.

--
Ticket URL: <https://code.djangoproject.com/ticket/25523#comment:2>

Reply all
Reply to author
Forward
0 new messages