Keyerror addhandler
Diez B. Roggisch
deets at nospam.web.de
Sun Apr 19 18:44:03 EDT 2009
Steven Macintyre schrieb:
> Hi all,
>
> I'm wondering if anyone can assist me with this as I am very confused about
> it now.
>
> I am getting the following error;
>
> Traceback (most recent call last):
> File "/usr/lib/python2.4/logging/config.py", line 191, in fileConfig
> logger.addHandler(handlers[hand])
> KeyError: 'handler_mylogfileHandler'
For me, that fails with
mac-dir:tmp deets$ python2.5 test.py
Traceback (most recent call last):
File "test.py", line 6, in <module>
logging.config.fileConfig("logging.conf")
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/logging/config.py",
line 84, in fileConfig
handlers = _install_handlers(cp, formatters)
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/logging/config.py",
line 149, in _install_handlers
klass = eval(klass, vars(logging))
File "<string>", line 1, in <module>
NameError: name 'RotatingFileHandler' is not defined
mac-dir:tmp deets$
Diez
More information about the Python-list
mailing list