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

sequential queueing of cells not working #6898

Open
leoscholl opened this issue Jun 1, 2023 · 18 comments
Open

sequential queueing of cells not working #6898

leoscholl opened this issue Jun 1, 2023 · 18 comments
Labels
Milestone

Comments

@leoscholl
Copy link

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 leoscholl added the bug label Jun 1, 2023
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to issues that need triage label Jun 1, 2023
@leoscholl
Copy link
Author

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

@JasonWeill
Copy link
Collaborator

@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?

@leoscholl
Copy link
Author

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?

@jtpio
Copy link
Member

jtpio commented Jun 6, 2023

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

@RRosio
Copy link
Collaborator

RRosio commented Jun 13, 2023

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 RRosio added this to the 6.5 milestone Jun 20, 2023
@RRosio RRosio removed status:Needs Triage Applied to issues that need triage status:Needs Info labels Jun 20, 2023
@divyabiyani
Copy link

@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
Copy link

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

@leoscholl
Copy link
Author

Was this issue resolved for you with notebook 7?

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

@divyabiyani
Copy link

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
Copy link

@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.

@leoscholl
Copy link
Author

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.

@a-r-r-o-w
Copy link

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.

@danielqu22
Copy link

danielqu22 commented Dec 7, 2023

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
Copy link

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 :)

@andrii-i
Copy link
Contributor

andrii-i commented Dec 7, 2023

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.

@mfrancke
Copy link

@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

@leoscholl
Copy link
Author

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

@divyabiyani
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants