Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid duplicate 'Exception: message' in CellExecutionError #283

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

minrk
Copy link
Member

@minrk minrk commented Apr 14, 2023

tracebacks end with this info, so no need to repeat it in our template unless the traceback is empty. Currently exceptions end with:

...
----> 5 raise Exception("message")

Exception: message
Exception: message

where the first Exception: message occurs in the traceback, while the second is added by the message template. This PR removes the second, instead switching on an empty template in CellExecutionError.__str__.

Removes unused __unicode__ method for Python 2 unicode reprs.

@minrk minrk added the bug Something isn't working label Apr 14, 2023
tracebacks end with this info, so no need to repeat it in our template

Removes unused `__unicode__` method for Python 2 unicode reprs
Copy link
Member

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @minrk

@davidbrochart davidbrochart merged commit eab9611 into jupyter:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants