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

Add --save-on-error flag, closes #626 #842

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

berleon
Copy link
Contributor

@berleon berleon commented Jul 18, 2018

Save the notebook even if an error occurs.

Save the notebook even if an error occurs.
@takluyver
Copy link
Member

So there's already an option --allow-errors which will continue if an error occurs. Is it important to you that you stop executing the notebook but still convert/save it afterwards? I'm slightly concerned by how many error-handling options we're growing here - it feels like there should be a simpler way.

With your new option, is the error shown in the terminal at all?

@berleon
Copy link
Contributor Author

berleon commented Jul 19, 2018

My use-case is that I am running some experiments in the notebook. If an error occurs, I want to see the previous outputs. However, continue running (i.e. --allow-errors) can cost unnecessary time (multiple hours).

I agree that the additional flag might make it unnecessary complicated. What would you say to unify the error handling behaviour as --on-error=[abort|continue|stop] where abort would be the current default behaviour, continue would correspond to --allow-errors and stop would mean to still save/convert the notebook but not continue with the execution.

As with --allow-errors, the error is not shown in the terminal. I could print the error to stdout and add a message that the notebook will still be converted/saved.

@ciaochiaociao
Copy link

Any update?

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

Successfully merging this pull request may close these issues.

None yet

3 participants