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 ThomasRyschawy
Recipients ThomasRyschawy
Date 2012-01-17.16:00:13
SpamBayes Score 2.7537114e-06
Marked as misclassified No
Message-id <1326816014.41.0.202399739958.issue13807@psf.upfronthosting.co.za>
In-reply-to
Content
It seems to be known that in case of a Windows GUI app that isn’t connected to a console sys.stderr can be None. See the Note on http://docs.python.org/py3k/library/sys.html: Under some conditions stdin, stdout and stderr as well as the original values __stdin__, __stdout__ and __stderr__ can be None. It is usually the case for Windows GUI apps that aren’t connected to a console and Python apps started with pythonw.
In combination with logging this leads to an issue similar to issue #5971. In my case sys.stderr is None and File: lib\logging\__init__.py, Class: Handler, Method: handleError raises AttributeError: 'NoneType' object has no attribute 'write'.
A 'simple' solution would be to check if sys.stderr is not None. In case it is None handleError must not call traceback.print_exception() and not directly write to sys.stderr.
History
Date User Action Args
2012-01-17 16:00:14ThomasRyschawysetrecipients: + ThomasRyschawy
2012-01-17 16:00:14ThomasRyschawysetmessageid: <1326816014.41.0.202399739958.issue13807@psf.upfronthosting.co.za>
2012-01-17 16:00:13ThomasRyschawylinkissue13807 messages
2012-01-17 16:00:13ThomasRyschawycreate