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

The example does not work when there is a raise exception statement #4

Closed
fjborquez opened this issue Jul 24, 2022 · 3 comments
Closed

Comments

@fjborquez
Copy link
Contributor

fjborquez commented Jul 24, 2022

Hey!,
I was trying to replicate the example but using post.md.
That markdown file includes a "raise exception" statement.
When the line below was executing, the script was stoped because the exception was raised.
In order to complete the example, I added 3 params to the execution function.
Acording to the documentation, the function accepts a fourth parameter for traitlets. So I added allow_errors=True and the exception was included to the generated file.

I'm using PyCharm over a Windows 10 O.S.

out = nbclient.execute(nb)

@edublancas
Copy link
Collaborator

thanks for your feedback; please clarify a few things.

Is this failing? python build.py

I tried it, and it runs without issues. Perhaps the behavior of nbclient is different on windows? can you share the full error message?

@fjborquez
Copy link
Contributor Author

fjborquez commented Jul 24, 2022

Sure!
No, I don't tested the build.py but I used as reference to built my own proof of concept.
In that proof of concept I use the post.md file this project examples.
When the execution reach this line without the allow_errors parameter, the execution stops and then a "raise exception" appears, as the attached log file is showing.
The error message is raise ValueError('some error'), the same of the post.md file.
I don't know if os or ide affect in the error.
log.txt

@edublancas
Copy link
Collaborator

Ah ok, I understand. Yeah, so if you disable the allow_erros, nbclient will behave differently. I'm closing this since this is a configuration thing and not a problem with jupyblog. thanks for the feedback!

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

No branches or pull requests

2 participants