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 martin.panter
Recipients martin.panter
Date 2016-06-18.14:57:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466261856.58.0.470780414166.issue27348@psf.upfronthosting.co.za>
In-reply-to
Content
If the exception argument is None or repr(None), it is omitted from the report when a thread raises an unhandled exception:

>>> def raise_exception(e):
...     raise e
... 
>>> t = Thread(target=raise_exception, args=(Exception(None),)); t.start(); t.join()
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/proj/python/cpython/Lib/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/proj/python/cpython/Lib/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "<stdin>", line 2, in raise_exception
Exception

>>> t = Thread(target=raise_exception, args=(Exception("None"),)); t.start(); t.join()
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/proj/python/cpython/Lib/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/proj/python/cpython/Lib/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "<stdin>", line 2, in raise_exception
Exception

Compare the result with other exception messages, the normal sys.excepthook() report, and Python 2:

>>> t = Thread(target=raise_exception, args=(Exception("NONE"),)); t.start(); t.join()
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/home/proj/python/cpython/Lib/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/proj/python/cpython/Lib/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "<stdin>", line 2, in raise_exception
Exception: NONE

>>> raise Exception(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception: None
History
Date User Action Args
2016-06-18 14:57:36martin.pantersetrecipients: + martin.panter
2016-06-18 14:57:36martin.pantersetmessageid: <1466261856.58.0.470780414166.issue27348@psf.upfronthosting.co.za>
2016-06-18 14:57:36martin.panterlinkissue27348 messages
2016-06-18 14:57:36martin.pantercreate