notebook icon indicating copy to clipboard operation
notebook copied to clipboard

sequential queueing of cells not working

Open leoscholl opened this issue 2 years ago • 18 comments
trafficstars

I'm having issues similar to #5098 #4825 and #6794 which are all unresolved.

  • Jupyter version 6.5.4
  • OS: ubuntu 20.04

When i first run cells in a new notebook, new environment with just python3.9 and ipykernel, things work fine.

image

But if I try to queue up some more cells, only the first one runs.

image

Notice the "executed in 0ms" messages after trying to run those cells.

In the jupyter console I get these "Kernel does not exist" messages, not sure if it is related or not:

[I 15:02:27.694 NotebookApp] Starting buffering for 9216ccef-4201-4342-bc52-a028f811bfca:b304d623d91440c28393f63ec065f24e
[I 15:02:27.936 NotebookApp] Kernel restarted: 9216ccef-4201-4342-bc52-a028f811bfca
[I 15:02:27.955 NotebookApp] Restoring connection for 9216ccef-4201-4342-bc52-a028f811bfca:b304d623d91440c28393f63ec065f24e
CONDA_PREFIX=/home/aolab/miniconda3/envs/jupyter-test
[I 15:02:28.959 NotebookApp] Replaying 3 buffered messages
[W 15:02:36.955 NotebookApp] 404 GET /api/kernels/10e459da-d08b-49dc-a304-fe18f07016aa/channels?session_id=965d2597cca643449e915aff27ecf6b6 (128.95.205.111): Kernel does not exist: 10e459da-d08b-49dc-a304-fe18f07016aa
[W 15:02:36.956 NotebookApp] 404 GET /api/kernels/10e459da-d08b-49dc-a304-fe18f07016aa/channels?session_id=965d2597cca643449e915aff27ecf6b6 (128.95.205.111) 2.120000ms referer=None

This wasn't a problem until about a month ago when it started happening all the time. Don't know what changed. Tried updating notebook and ipykernel but neither made a difference.

leoscholl avatar Jun 01 '23 22:06 leoscholl

update: if i use "Run All Below" instead of hitting shift-enter a bunch, the queueing works fine..

leoscholl avatar Jun 05 '23 22:06 leoscholl

@leoscholl Thanks for your contribution! Which browser are you using? Does the bug still occur if you try a different browser or the same browser in private/etc mode, without extensions?

Also, have you tried using the Notebook 7 beta? Does this error recur in the newer version?

JasonWeill avatar Jun 06 '23 16:06 JasonWeill

I’m using the latest chrome on windows, it’s version 114.0.5735.110 I’ve tried chrome on windows, mac, Linux. Incognito also. No difference. Firefox and safari are the same.

Have not tried notebook 7 beta. Is it possible to install side by side with 6?

leoscholl avatar Jun 06 '23 16:06 leoscholl

Have not tried notebook 7 beta. Is it possible to install side by side with 6?

You can install it side-by-side with NBClassic (which provides the classic notebook 6 UI): https://jupyter-notebook.readthedocs.io/en/latest/migrating/multiple-interfaces.html

jtpio avatar Jun 06 '23 18:06 jtpio

Hi @leoscholl, please try this out in Notebook 7. This might not be something that we can fix in Notebook 6 at the moment.

RRosio avatar Jun 13 '23 16:06 RRosio

@RRosio, I am facing the same issue currently with the following version of core packages

IPython : 8.4.0 ipykernel : 6.14.0 ipywidgets : not installed jupyter_client : 8.3.0 jupyter_core : 5.3.1 jupyter_server : 2.7.0 jupyterlab : 4.0.2 nbclient : 0.8.0 nbconvert : 7.6.0 nbformat : 5.9.1 notebook : 7.0.0rc2 qtconsole : not installed traitlets : 5.9.0

@leoscholl , Was this issue resolved for you with notebook 7?

divyabiyani avatar Jul 12 '23 10:07 divyabiyani

@RRosio, Could you help with this issue. It is still occurring with notebook 7 as well.

divyabiyani avatar Jul 19 '23 05:07 divyabiyani

Was this issue resolved for you with notebook 7?

I am using jupyterlab now with no issues. Have not tried notebook 7.

leoscholl avatar Jul 19 '23 13:07 leoscholl

Was this issue resolved for you with notebook 7?

I am using jupyterlab now with no issues. Have not tried notebook 7.

@leoscholl , Can you share versions of your core packages?

divyabiyani avatar Jul 20 '23 09:07 divyabiyani

@leoscholl, If possible can you share versions of your core packages? I still have this issue with 6.5.4 version as well as 7.

divyabiyani avatar Jul 25 '23 08:07 divyabiyani

Hi @divyabiyani this is what I have installed:

IPython          : 8.13.2
ipykernel        : 6.23.1
ipywidgets       : 8.0.7
jupyter_client   : 8.2.0
jupyter_core     : 5.3.0
jupyter_server   : 2.6.0
jupyterlab       : 3.6.5
nbclient         : 0.8.0
nbconvert        : 7.4.0
nbformat         : 5.9.0
notebook         : 6.5.4
qtconsole        : not installed
traitlets        : 5.9.0

Notebook 6 not working correctly but jupyterlab 3.6.5 works fine.

leoscholl avatar Jul 31 '23 20:07 leoscholl

Still facing this issue:

IPython          : 8.16.1
ipykernel        : 6.25.2
ipywidgets       : 8.1.1
jupyter_client   : 7.4.9
jupyter_core     : 5.4.0
jupyter_server   : 2.7.3
jupyterlab       : 4.0.6
nbclient         : 0.8.0
nbconvert        : 7.9.2
nbformat         : 5.9.2
notebook         : 7.0.4
qtconsole        : 5.4.4
traitlets        : 5.11.2

No browser I've tried works. Shift+Enter to execute cells only runs the first cell and skips the rest if the first cell execution does not complete instantly.

a-r-r-o-w avatar Oct 10 '23 17:10 a-r-r-o-w

I have also run into this issue. My packages are:

jupyter core : 4.7.0 jupyter-notebook : 6.1.5 qtconsole : 5.3.0 ipython : 8.2.0 ipykernel : 5.3.4 jupyter client : 6.1.7 jupyter lab : 3.3.1 nbconvert : 6.4.5 ipywidgets : 7.7.1 nbformat : 5.3.0 traitlets : 5.0.5

Strangely, I only run into this error after running a cell that sets some variable to a string. If I run the following cells it is fine: image

But as soon as I add something like image the queueing stops working (you can see the last cell is marked as executed even though it has no output).

I started my notebook with the --debug option, and it indeed prints some error in the console as soon as some variable is set to a string:

image

It is not specific to strings; if I try assigning the variable to a list or a dict I get the same error, and it persists until I restart my kernel. However, setting a variable to an int works totally fine, which is mind-boggling.

danielqu22 avatar Dec 07 '23 19:12 danielqu22

After playing around with this a bit more, I found that disabling the "Variable Inspector" nbextension solved my issues. I see from your screenshot that you have it enabled @leoscholl. Hopefully that fixes it for you as well, albeit 6 months late :)

danielqu22 avatar Dec 07 '23 20:12 danielqu22

Thank you @danielqu22.

@leoscholl, if this issue is still relevant, could you please check if you have "Variable Inspector" nbextension installed (jupyter notebook extension list in terminal)? And if yes, please try disabling it and see if problem goes away.

andrii-i avatar Dec 07 '23 22:12 andrii-i

@andrii-i I have had this issue too (for some months). I can confirm that disabling 'Variable Inspector' fixes the issue for me

thanks @danielqu22

mfrancke avatar Dec 13 '23 12:12 mfrancke

thanks @danielqu22 for figuring this out. Yes, disabling variable inspector fixes the issue for me too.

leoscholl avatar Dec 13 '23 17:12 leoscholl

Hey @danielqu22. Thanks for the suggestion. Post this fix, I am facing another issue wherein the sequential cells stop working if the current cell execution time is more than 8-10 minutes.

Upon further investigation, it turns out that the kernel's execution_state becomes idle post this long time taking cell's execution. It might be because of last_Activity not getting updated in this post 8-9 minutes. Is there a way to increase the kernel_idle_timeout?

cc: @leoscholl

divyabiyani avatar Dec 14 '23 06:12 divyabiyani