Wrong formatting of python exceptions
Kentzo
Posted on
May 27 2014
Below is an exception formatted and shown via web interface:
Exception:
File "/Console.py", line 27, in
<module>.null
File "/andy.py", line 8, in
<module>.null
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2237, in
_find_and_load.return _find_and_load_unlocked(name, import_)
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2226, in
_find_and_load_unlocked.module = _SpecMethods(spec)._load_unlocked()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1191, in
_load_unlocked.return self._load_backward_compatible()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1161, in
_load_backward_compatible.spec.loader.load_module(spec.name)
File "/andy\__main__.py", line 18, in
<module>.null
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2237, in
_find_and_load.return _find_and_load_unlocked(name, import_)
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2226, in
_find_and_load_unlocked.module = _SpecMethods(spec)._load_unlocked()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1191, in
_load_unlocked.return self._load_backward_compatible()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1161, in
_load_backward_compatible.spec.loader.load_module(spec.name)
File "/zmq\__init__.py", line 75, in
<module>.null
It should be formatted in the same way as being printed in terminal:
Traceback (most recent call last):
File "/Console.py", line 27, in <module>
File "/andy.py", line 8, in <module>
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
module = _SpecMethods(spec)._load_unlocked()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
return self._load_backward_compatible()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/andy\__main__.py", line 18, in <module>
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
module = _SpecMethods(spec)._load_unlocked()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
return self._load_backward_compatible()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/zmq\__init__.py", line 75, in <module>
Exception
Notice that there is no "null" and no new line after "in".
Callum
Posted on
May 27 2014
Right you are - I'll look at getting a fix for this applied today. Thanks for reporting this and hope Raygun continues to be useful for you.
Edit: This has now been completed, let us know if you have any further issues.
Regards,
Callum Gavin
Mindscape Limited
Kentzo
Posted on
May 27 2014
Exception:
File "/Console.py", line 27, in <module>
null
File "/andy.py", line 8, in <module>
null
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
module = _SpecMethods(spec)._load_unlocked()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
return self._load_backward_compatible()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/andy\__main__.py", line 18, in <module>
null
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
module = _SpecMethods(spec)._load_unlocked()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
return self._load_backward_compatible()
File "C:\Python34-x86\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/zmq\__init__.py", line 75, in <module>
null
Is possible to remove null as well (compare with canonical print above)?