You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/me/test.py", line 10, in test_this
this_fails()
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/me/test.py", line 12, in test_thisself.fail('Fail')
AssertionError: Fail
But if the toy example contained a nested call, e.g.
I get the last 2 frames for each chained exception:
Traceback (most recent call last):
File "/Users/me/test.py", line 10, in helper
this_fails()
File "/Users/me/test.py", line 4, in this_fails
a =1+NoneTypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/me/test.py", line 15, in test_thisself.helper()
File "/Users/me/test.py", line 12, in helperself.fail('Fail')
AssertionError: Fail
Ideally, it would be great if the traceback went back to the root of the exception regardless.
This issue was first reported as bpo-24959. It would be better to close the newer issues as duplicates of the first one, instead of keeping all the duplicates open. Otherwise, the history and discussion gets fragmented across multiple locations.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: