-
Notifications
You must be signed in to change notification settings - Fork 18
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
Treat exceptions raised outside of notebook cells as errors #77
Comments
Thanks for the bug report @hodgestar, and for using nbmake! I'm going to take a look at this one in the next week. e: If you are able to link me to an open source notebook then this can help me repro the issue. |
@alex-treebeard Apologies for the delay. Below is an example of three cells that demonstrate the issue for me: %matplotlib inline
import matplotlib.pyplot as plt fig, ax = plt.subplots(1, 1)
ax.plot([0, 1, 2], [0, 1, 2])
ax.set_xlabel(r"$\\tau$"); print("Notebook execution continued despite the error!") The final cell executes despite the error printed by the second cell, which for me ends wth:
|
hi @hodgestar , this has been fixed in 1.3.4 -- please reopen if any issues |
@alex-treebeard That is awesome. Thank you! |
Is your feature request related to a problem? Please describe.
When executing a notebook cell, exceptions may be raised after the cell executes. This can happen, for example, when plotting a matplotlib figure using
%matplotlib inline
and an invalid label such asr"\\tau"
(the double-slash is an incorrect escape). These exceptions raised after the cell completes are not picked up by nbmake (and also don't halt notebook execution in the Jupyter kernel).Describe the solution you'd like
It would be nice to report these errors as failures. I don't know enough about how nbmake is implemented to know how difficult this would be.
Describe alternatives you've considered
Additional context
Thank you for maintaining nbmake -- it is an excellent tool.
The text was updated successfully, but these errors were encountered: