notebook: Notebook stuck in run mode
I have a weird issue which involves the notebook. The notebook gets stuck during the execution as some random position, the CPU becomes idle and the computation stops, while the notebooks shows the the In[*]
prompt on the remaining cells. The system is windows x64, conda, python 3.4 with notebook 4.0.6 and nbconvert 4.1.
I have a set of notebooks used to analyze a dataset. These notebooks are run in sequence by a “master” notebook.
To run a notebook from the master notebook I use a function (run_notebook()
) which does:
nb = nbformat.read(nb_name_full, as_version=4)
ep = ExecutePreprocessor(timeout = 3600)
out = ep.preprocess(nb, {'metadata': {'path': './'}})
nbformat.write(nb, out_nb_name)
display(FileLink(out_nb_name))
Some notebooks take also input parameters which I add to the first cell before execution. In this case, I use a modified function (run_notebook_template()
) which adds a cell with the parameters as follows:
nb = nbformat.read(nb_name_full, as_version=4)
nb['cells'].insert(1, nbformat.v4.new_code_cell('data_id = "%s"' % data_id))
nb['cells'].insert(1, nbformat.v4.new_code_cell('ph_sel_name = "%s"' % ph_sel))
The complete functions are here.
Executing the master notebook with Run-All, or cell-by-cell, causes the execution to stop in some random cell calling run_notebook_template()
(the parametric runner).
No messages are shown in the console (even in debug mode) except for autosaving messages. Only occasionally (i.e. after letting the notebook run overnight) I get this:
[IPKernelApp] WARNING | Timeout waiting for IOPub output
Let me know if you need more info.
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 2
- Comments: 17 (9 by maintainers)
I’m having the same issue with Microsoft Surface Pro 4 running Windows 10. I execute a cell and it just hangs. The Notebooks get saved automatically, so I know the kernel is not completely hosed.
Hi
I still get stuck like this from time to time, and it is hard to reproduce. Any suggestion for remedy?