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

Warning messages and TimeoutError: Cell execution timed out #613

Closed
spring-haru opened this issue May 21, 2020 · 2 comments
Closed

Warning messages and TimeoutError: Cell execution timed out #613

spring-haru opened this issue May 21, 2020 · 2 comments

Comments

@spring-haru
Copy link

[The File in Question]

I have 28 .ipynb and .md files for my JB, and one of them is called 12_Asymptotics.ipynb. It has 2125 lines, and contains a series of simulation. It takes about 18 minutes to finish executing the ipynb file.

[Problem]

After calling jb build to create my JB with all files, I get warning messages:

WARNING: Execution Failed: /Users/myname/Documents/My_Simulation/Python/JupyterBooks/book_etrics/docs/12_Asymptotics.ipynb
WARNING: Couldn't find cache key for notebook file docs/12_Asymptotics.ipynb. Outputs will not be inserted.
  Last execution failed with traceback saved in /Users/myname/Documents/My_Simulation/Python/JupyterBooks/book_etrics/_build/html/reports/12_Asymptotics.log

jb clean . —all does not help. I tried many times.

On the other hand, my JB seems to show all outputs (figures, equations, etc) of 12_Asymptotics.ipynb, despite that the error message says “Outputs will not be inserted”. Indeed, after calling

jb clean . —all
jb build .

the same warning messages are shown, but all outputs seem to be included in my JB.

On the other hand, after modifying the .ipynb file and excuting

jb clean .
jb build .

the same warning messages are shown and the 12_Asymptotics.ipynb part of my JB is NOT updated.

Below is the content of the 12_Asymtotics.log file, which says TimeoutError: Cell execution timed out.

Traceback (most recent call last):
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/jupyter_cache/executors/basic.py", line 157, in execute
    executenb(nb_bundle.nb, cwd=tmpdirname)
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 737, in executenb
    return ep.preprocess(nb, resources, km=km)[0]
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 405, in preprocess
    nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/nbconvert/preprocessors/base.py", line 69, in preprocess
    nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 438, in preprocess_cell
    reply, outputs = self.run_cell(cell, cell_index, store_history)
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 571, in run_cell
    if self._passed_deadline(deadline):
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 541, in _passed_deadline
    self._handle_timeout()
  File "/Users/myname/anaconda3/envs/JupyterBook/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 504, in _handle_timeout
    raise TimeoutError("Cell execution timed out")
TimeoutError: Cell execution timed out
@choldgraf
Copy link
Collaborator

Thanks for catching this - I believe @bmcfee had the same problem as well. We are working on a fix 👍 executablebooks/jupyter-cache#39

@chrisjsewell
Copy link
Contributor

This should be closed in v0.8.0 😄, but feel free to re-open/open another issue if anything is outstanding: https://jupyterbook.org/reference/_changelog.html#v0-8-0-2020-09-01

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

3 participants