question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimeoutError when running cells after a kernel restart

See original GitHub issue

Full traceback below; cell runs fine via highlight + “Run selection or current line”; behavior’s fixed upon restarting kernel, but returns randomly after finishing a TensorFlow training session (didn’t test in other settings).

Traceback (most recent call last):

  File "D:\Anaconda\envs\s4_env\lib\site-packages\spyder_kernels\comms\commbase.py", line 542, in __call__
    call_dict, call_data, self._comm_id)
  File "D:\Anaconda\envs\s4_env\lib\site-packages\spyder_kernels\comms\commbase.py", line 415, in _get_call_return_value
    self._wait_reply(call_id, call_name, timeout)
  File "D:\Anaconda\envs\s4_env\lib\site-packages\spyder_kernels\comms\frontendcomm.py", line 161, in _wait_reply
    call_name))

TimeoutError: Timeout while waiting for 'run_cell' reply

Update: reproduced immediately after restarting kernel and working with basic numpy operations


Update 2: interrupting frozen run-cell command yields below:

Traceback (most recent call last):

  File "<ipython-input-4-633e420a5051>", line 1, in <module>
    runcell('[], #5', 'C:/DL_code/dev_ensemble_subset.py')
  File "D:\Anaconda\envs\s4_env\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 539, in runcell
    cell_code = frontend_request().run_cell(cellname, filename)
  File "D:\Anaconda\envs\s4_env\lib\site-packages\spyder_kernels\comms\commbase.py", line 542, in __call__
    call_dict, call_data, self._comm_id)
  File "D:\Anaconda\envs\s4_env\lib\site-packages\spyder_kernels\comms\commbase.py", line 415, in _get_call_return_value
    self._wait_reply(call_id, call_name, timeout)
  File "D:\Anaconda\envs\s4_env\lib\site-packages\spyder_kernels\comms\frontendcomm.py", line 167, in _wait_reply
    time.sleep(0.01)

KeyboardInterrupt

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
impact27commented, Dec 28, 2019

I can’t reproduce on mac. A workaroud could be to select this in the settings: Screenshot 2019-12-28 at 17 21 12

1reaction
ccordoba12commented, Jan 9, 2020

This will be fixed in Spyder 4.1, to be released in a couple of months. In the meantime, please switch to the old way of evaluating cells, as described here:

https://stackoverflow.com/a/59494870/438386

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Notebook: Timeout waiting for kernel_info_reply
My problem was solved by uninstalling anaconda, after which I downloaded and installed the latest anaconda version.
Read more >
Jupyter timeout errors - DOMINO SUPPORT
If you are running a Jupyter notebook as a batch job, and it contains a long-running cell, you may encounter the following error:...
Read more >
Random failure to connect when initializing or restarting a ...
A few days ago, I started having major issues with notebooks. Half the time, I can open a notebook just fine, and the...
Read more >
Emacs IPython Notebook 0.2.1alpha1 documentation
When auto-execution mode is on, cells in connected notebook will be automatically executed whenever run, eval or reload command [4] is called in...
Read more >
nbclient Documentation
on_cell_complete will run after execution, if the cell is executed with no errors ... The time to wait (in seconds) for the kernel...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found