MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

``nb_execution_show_tb = True`` does not work when ``nb_execution_raise_on_error = True``

Open FrancescMartiEscofetQC opened this issue 1 year ago • 0 comments

Describe the bug

context When I set nb_execution_show_tb = True the traceback is not shown in the case nb_execution_raise_on_error = True.

expectation I expected to see the traceback on the console.

bug But instead just a plain ExecutionError with the name of the file is shown.

problem This is a problem for people building the documentation on ReadtheDocs as the log files can't be accessed.

As far as I can tell, the problem comes from these lines where we raise the error before adding the traceback to the message and the traceback is never shown.

Reproduce the bug

Set nb_execution_show_tb = True and nb_execution_raise_on_error = True in conf.py.

List your environment

No response

FrancescMartiEscofetQC avatar Jul 23 '24 07:07 FrancescMartiEscofetQC