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

Problem with Restart kernel and run all cells for R and Julia kernels in datascience-notebook? #1167

Closed
JamesSample opened this issue Sep 22, 2020 · 3 comments · Fixed by #1222
Labels
tag:Upstream A problem with one of the upstream packages installed in the docker images

Comments

@JamesSample
Copy link

Hi,

I'm having issues with the Restart kernel and run all cells command for R and Julia kernels in the latest versions of the datascience-notebook (both the option in the Kernel menu and the shortcut button at the top of my notebooks). Older versions of the image (e.g. 54462805efcb) work fine, but in the latest versions I have to separately use the "Restart kernel" command - sometimes several times - followed by the Run all command. This only applies to the Julia and R kernels; Restart kernel and run all cells works fine for the Python kernel.

All kernels do work eventually (i.e. my code runs successfully), but the user experience is now a little confusing/frustrating, especially for new users.

What docker image you are using?

jupyter/datascience-notebook

What complete docker command do you run to launch the container (omitting sensitive values)?

docker run -ti --rm -p 8888:8888 -v ${PWD}:/home/jovyan/work jupyter/datascience-notebook:latest start.sh jupyter lab

What steps do you take once the container is running to reproduce the issue?

  1. Visit http://127.0.0.1:8888 and log-in with the token
  2. Create a new R or Julia notebook and enter some simple example code in the first cell (e.g. print("Hello world") for R or println("Hello world") for Julia). Run the cell and confirm that the output is printed successfully
  3. Choose Restart kernel and run all cells from the Kernel menu (or use the equivalent button at the top of the notebook)

What do you expect to happen?

The kernel should be restarted, the cell should be executed, and the output should be printed again.

What actually happens?

The notebook "hangs" indefinitely, with asterisk symbols (*) next to each code cell. The terminal running the notebook server simply shows e.g.

Kernel restarted: db776add-f28d-45d3-90ce-06e6ab7efb6e

but nothing actually happens.

A workaround is to choose Kernel > Restart kernel, then wait until it says Kernel | Idle at the bottom left of the screen, then choose Run > Run all cells. This works OK, but it's cumbersome.

I'm testing with Linux containers running on Docker for Windows, but I have exactly the same problem when the image is deployed in Google Cloud on my JupyterHub.

I guess something isn't waiting for the kernel to restart properly before trying to run the code, but I'm not sure where to look next to pin down the problem. Any advice gratefully received.

Thanks!

@romainx
Copy link
Collaborator

romainx commented Sep 25, 2020

Hello @JamesSample

Thanks for reporting that. I confirm that I can reproduce it and that it only occurs with Jupyterlab and not classic Jupyter notebook UI.
This bug has been reported in the Jupyterlab project jupyterlab/jupyterlab#9008.
So the most probable cause is that it is related to this upstream issue. In consequence we cannot do anything here, we just have to wait for the fix in the upstream project and update the images. In the meantime, if it's really annoying for you, you can try to use an older version of the stack or use the classic notebook interface.

Best.

@romainx romainx added the tag:Upstream A problem with one of the upstream packages installed in the docker images label Sep 25, 2020
@JamesSample
Copy link
Author

Thanks @romainx! I'll downgrade to an older version of the image until the issue is fixed in JupyterLab.

Feel free to close this issue to avoid duplication if you think that's best.

@romainx
Copy link
Collaborator

romainx commented Sep 25, 2020

@JamesSample thank you. I let it as a reminder to bump the package version once fixed.

Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag:Upstream A problem with one of the upstream packages installed in the docker images
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants