-
Notifications
You must be signed in to change notification settings - Fork 567
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
Traceback in cell execution error #521
Traceback in cell execution error #521
Conversation
This looks like useful functionality and a straightforward change. I'd prefer to see a test to make sure that we never break this functionality once it's included. I could imagine testing against the content of a traceback might be an issue… but it seems like that would be the appropriate approach for testing this feature. |
I think it should be sufficient to test that the error string is shown. I.e. have a cell: raise Exception("Can you see me?") Then run that in nbconvert and assert that the exception shows "Can you see me?". |
nbconvert/utils/exceptions.py
Outdated
|
||
def __init__(self, message): | ||
super(ConversionException, self).__init__(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that necessary ? Wouldn't message be passed to Exception
if there is no init ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes, that's right. Will remove.
@mupdt982 it looks like we're waiting on a couple of changes here (test, remove unnecessary |
@takluyver: I've got a fix now, will push soon. |
Removes __init__ from empty exception constructor. Also adds tests for unicode in message exceptions.
Please take another look.
|
Thanks, that looks good to me. |
We're executing Notebooks during CI to make sure the content is always up-to-date.
However, if the execution fails, we get the following error message fro nbconvert:
The message only says
CellExecutionError
, which makes it hard to pinpoint the cell and code where things went wrong.This patch adds a traceback to the error message. It now looks like this: