[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator

Александр report at bugs.python.org
Wed Aug 10 13:19:44 CEST 2011


Александр <alexandr.s.rus at gmail.com> added the comment:

Install rpdb2 or winpdb for you python. And install django to you python path.
Create empty djnago-project:
django-admin createproject bbbtest 

Add line LOGGING_CONFIG = 'logging.config.dictConfig' to setting.py for use python logging.config for logging.

Execute rpdb2 ./manage.py help

And you get traceback:


Traceback (most recent call last):
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/rpdb2.py", line 14499, in <module>
    ret = rpdb2.main()
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/rpdb2.py", line 14470, in main
    StartServer(_rpdb2_args, fchdir, _rpdb2_pwd, fAllowUnencrypted, fAllowRemote, secret)
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/rpdb2.py", line 14220, in StartServer
    imp.load_source('__main__', _path)    
  File "/tmp/bbbtest/manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py", line 368, in execute
    sys.stderr.write(self.main_help_text() + '\n')
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py", line 239, in main_help_text
    commands = get_commands().keys()
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py", line 101, in get_commands
    apps = settings.INSTALLED_APPS
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__
    self._setup()
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/conf/__init__.py", line 139, in __init__
    logging_config_func(self.LOGGING)
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/logging/config.py", line 782, in dictConfig
    dictConfigClass(config).configure()
  File "/home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/logging/config.py", line 581, in configure
    '%r: %s' % (name, e))
ValueError: Unable to configure handler 'mail_admins': __import__() argument 1 must be string, not DictConfigurator

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12718>
_______________________________________


More information about the Python-bugs-list mailing list