Open YannickJadoul opened 11 months ago
I often get similiar problems with plotly with nbconvert ending with the same
content: {'execution_state': 'idle'}
when using the --debug
flag
and for me as well putting in some time.sleep(1)
around seems to solve the issue. Clearly some race conditions taking place...
@TermeHansen I agree about the smell of race conditions, but I didn't manage to figure out a consistent solution of where to put sleep
.
i have raise an merge request about the issue https://github.com/jupyter/nbclient/issues/312
jupyter nbconvert --execute minimal_reproducer.ipynb --to html
sometimes unpredictably hangs when executing the notebook.I've managed to reduce the reproducing notebook to just a single cell, which combines
ipywidgets.interact
with a function which returns anIPython.display.Audio
object as result of the function:Some extra details:
--debug
, I get the following output:$jupyter nbconvert --debug --execute minimal_reproducer.ipynb --to html
Sometimes, when the execution does halt and finish successfully, an error
[IPKernelApp] ERROR | KeyboardInterrupt caught in kernel.
shows up in the debug output, right after the previous lines.Adding
time.sleep(1)
thepywidgets.interact
line seems to provide a workaround, as far as I can test. So is there some sort of race condition going on?