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

ExecutePreprocessor: stop at error but save notebook (and stack trace) #626

Open
matthias-k opened this issue Jul 13, 2017 · 4 comments
Open

Comments

@matthias-k
Copy link

Hi,

I am trying to use nbconvert to run notebooks from the commandline. I would like to stop if cell execution fails anywhere (as it is the default), but in this case I see only the raw exception at the command line. Since the notebook is not saved in this case, I have no access to the full stack trace of the exception.

is it possible to either

Thankyou for your help!

@takluyver
Copy link
Member

Yep, we should include the traceback in the error message as well.

@markusbaden
Copy link

Hi there,

I'm running into a similar problem. When executing notebook in a Jenkins pipeline, it would be great @matthias-k second suggestion would be possible.

Then I could execute the notebook via Jenkins and in case of a failure for example attach the HTML output showing the notebook execution up to the error as an attachment to an email.

Based on my tests it seems that with allow_error nbconvert does return no error code and without allow_error it does return an error code, but does not save the HTML output.

Many thanks for your help (and of course nbconvert!)

berleon added a commit to berleon/nbconvert that referenced this issue Jul 18, 2018
Save the notebook even if an error occurs.
berleon added a commit to berleon/nbconvert that referenced this issue Jul 18, 2018
Save the notebook even if an error occurs.
@sebbov
Copy link

sebbov commented Sep 12, 2018

👍 for Kaggle. What's the status for this. Will the --save-on-error support be merged in?

@timgriffiths
Copy link

@berleon have you tried to get your fix merged we would be very interested in this feature as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants