Message151462
| 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:14 | ThomasRyschawy | set | recipients:
+ ThomasRyschawy |
| 2012年01月17日 16:00:14 | ThomasRyschawy | set | messageid: <1326816014.41.0.202399739958.issue13807@psf.upfronthosting.co.za> |
| 2012年01月17日 16:00:13 | ThomasRyschawy | link | issue13807 messages |
| 2012年01月17日 16:00:13 | ThomasRyschawy | create |
|