Notebook: Cell-busy asterisk ([*]) remains visible even after cell is finished evaluating

Created on 12 Aug 2017  路  11Comments  路  Source: jupyter/notebook

screen shot 2017-08-11 at 4 14 00 pm
screen shot 2017-08-11 at 4 13 36 pm

If you run the above note book all-at-once (Restart Kernel & Run All option), the asterisk shows for both cells, even though the first one has finished executing, and has even printed the cell outputs. This can cause confusion with identifying which is the slow step when evaluating a bunch of cells at once.

Note: Could be a related issue to #2216

Most helpful comment

Same problem here:

  • python_version: 3.7
  • jupyter: 1.0.0
  • notebook: 5.7.0
  • ipykernel: 5.1.0
  • pyzmq: 17.1.2

All 11 comments

Issue seems to be that the execute_reply message doesn't come from IPython kernel until the next cell completes. Some potential solutions might be:

  • in ipython/ipykernel, flush the shell streams more often
  • or in the notebook, set the input prompt when receiving the execute_result message instead of waiting for the execute_reply

I believe this is a bug in pyzmq that's fixed in pyzmq 17 (should be released soon). We could probably add a flush workaround that would make it work in ipykernel with pyzmq 16, but pyzmq 17 ought to be out shortly.

@minrk did upgrading to pyzmq 17 fix it? Do you know what changed in pyzmq 17?

We are running ipykernel 4.6.1, not sure if there were improvements after that to work around the issue?

The fix would almost certainly be in ipykernel or pyzmq. If you make sure that you are using ipykernel 4.9 and pyzmq 17.1 and still see this issue, please report back.

Same problem here:

  • python_version: 3.7
  • jupyter: 1.0.0
  • notebook: 5.7.0
  • ipykernel: 5.1.0
  • pyzmq: 17.1.2

Same problem here. Only occurs after upgrading to python3 (no such problem in python 2).

pyzmq                     17.1.2
ipykernel                 5.1.0 
notebook                  5.7.4 
jupyter                   1.0.0                    
jupyter_client            5.2.4                   
jupyter_console           6.0.0                 
jupyter_core              4.4.0                    
jupyterlab                0.35.3                     
jupyterlab_server         0.2.0                    
python                    3.7.1
pandas                    0.23.4

It seems to happen when I use pandas to read large csv files.

I've been trying to get the jupyter notebook team attention about this for quite some time now:
https://github.com/jupyter/notebook/issues/4334 to no avail, despite multiple other users having the same issue.

The problem started specifically in python 3.6.0, for the complete notes please see that issue.

Is it possible this is a pandas issue?

No, as you can see from https://github.com/jupyter/notebook/issues/4334 I created a reproducible notebook with just print() and sleep(). sleep() emulating any long-running cell, which pandas would be just one of the thousands of possibilities. And if you downgrade to python 3.5 (just for the sake of testing), based on my bisecting on different version the problem would go away.

Same problem. Using Anaconda python 2.7.14.
Happens when pandas loading large csv file.

pyzmq 16.0.2 ipykernel 4.6.1

FYI, @minrk coded a fix, but for some reason won't merge it for a really long time now:
https://github.com/ipython/ipykernel/pull/390
Perhaps if people start asking it'll actually get merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mowe96 picture mowe96  路  3Comments

mmngreco picture mmngreco  路  3Comments

ehossain1982 picture ehossain1982  路  3Comments

uolter picture uolter  路  3Comments

arbaazsama picture arbaazsama  路  3Comments