This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Alzakath
Recipients Alzakath
Date 2013-03-18.07:34:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363592089.61.0.213350705624.issue17453@psf.upfronthosting.co.za>
In-reply-to
Content
In python 2.7 this code works:

>>> import logging.config
>>> import StringIO
>>> a="""[loggers]
... keys = root
... [logger_root]
... handlers = ""
... [formatters]
... keys = ""
... [handlers]
... keys = ""
... """
>>> logging.config.fileConfig(StringIO.StringIO(a))
>>> 

whereas in python 3.3 it raises an exception:

>>> import logging.config
>>> import io
>>> a="""[loggers]
... keys = root
... [logger_root]
... handlers = ""
... [formatters]
... keys = ""
... [handlers]
... keys = ""
... """
>>> logging.config.fileConfig(io.StringIO(a))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py", line 70, in fileConfig
    formatters = _create_formatters(cp)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py", line 114, in _create_formatters
    class_name = cp[sectname].get("class")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/configparser.py", line 942, in __getitem__
    raise KeyError(key)
KeyError: 'formatter_""'
>>>
History
Date User Action Args
2013-03-18 07:34:49Alzakathsetrecipients: + Alzakath
2013-03-18 07:34:49Alzakathsetmessageid: <1363592089.61.0.213350705624.issue17453@psf.upfronthosting.co.za>
2013-03-18 07:34:49Alzakathlinkissue17453 messages
2013-03-18 07:34:49Alzakathcreate