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

Jupyter notebook can't connect to kernel #132

Closed
MathewBiddle opened this issue Mar 23, 2023 · 6 comments
Closed

Jupyter notebook can't connect to kernel #132

MathewBiddle opened this issue Mar 23, 2023 · 6 comments

Comments

@MathewBiddle
Copy link
Contributor

When I start up a jupyter notebook, I get a notification about a migration plan to Jupyter 7 and the Kernel doesn't connect. Below is a screenshot of the notebook followed by the command line STDOUT when running jupyter notebook. I think it's all the Forbidden notifications that keep me from connecting to the Kernel.

image

(IOOS) ~\GitProjects\ioos_code_lab>jupyter notebook

  _   _          _      _      
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 08:43:30.441 NotebookApp] Loading IPython parallel extension
[I 08:43:35.777 NotebookApp] Serving notebooks from local directory: ~\GitProjects\ioos_code_lab
[I 08:43:35.777 NotebookApp] Jupyter Notebook 6.5.3 is running at:
[W 08:48:44.795 NotebookApp] Forbidden
[W 08:48:44.796 NotebookApp] 403 POST /api/sessions (127.0.0.1) 1.000000ms referer=http://localhost:8888/notebooks/jupyterbook/content/code_gallery/data_access_notebooks/2022-11-23_pyobis_example.ipynb
[I 08:48:44.797 NotebookApp] 302 GET /kernelspecs/python3/logo-64x64.png (127.0.0.1) 0.990000ms
[W 08:48:44.798 NotebookApp] Forbidden
[W 08:48:44.800 NotebookApp] 403 GET /api/contents/jupyterbook/content/code_gallery/data_access_notebooks/2022-11-23_pyobis_example.ipynb/checkpoints?_=1679575722734 (127.0.0.1) 1.000000ms referer=http://localhost:8888/notebooks/jupyterbook/content/code_gallery/data
_access_notebooks/2022-11-23_pyobis_example.ipynb
[W 09:12:52.185 NotebookApp] Forbidden
[W 09:12:52.185 NotebookApp] 403 GET /api/sessions?_=1679575661738 (127.0.0.1) 0.000000ms referer=http://localhost:8888/tree/jupyterbook/content/code_gallery/data_access_notebooks 
[W 09:12:52.187 NotebookApp] Forbidden                                                                                                                                              
[W 09:12:52.188 NotebookApp] 403 GET /api/terminals?_=1679575661739 (127.0.0.1) 1.730000ms referer=http://localhost:8888/tree/jupyterbook/content/code_gallery/data_access_notebooks
[I 09:12:55.922 NotebookApp] Interrupted...
[I 09:12:55.923 NotebookApp] Shutting down 0 kernels  
[I 09:12:55.925 NotebookApp] Shutting down 0 terminals
@MathewBiddle
Copy link
Contributor Author

running jupyter nbclassic seems to resolve the issue for now. Thanks @ocefpaf!

I'm leaving this open as we should consider what our next move is.

@ocefpaf
Copy link
Member

ocefpaf commented Mar 23, 2023

Upstream issue jupyter/notebook#6702

For more context: jupyter notebook has a slower development and will be replaced by Jupyterlab at some point. The jupyter nbclassic alternative gives users the same UI as jupyter notebook but runs jupyterlab under the hood. If one wants to be on the cutting edge you can run jupyter-lab directly.

@ocefpaf
Copy link
Member

ocefpaf commented Mar 27, 2023

I'm leaving this open as we should consider what our next move is.

Here are a few options that are not necessarily mutually exclusive:

  1. Pin jupyter_server<2.0.0 in our env. That is the workaround recommended in the issue above;
  2. Add a note that users of the "old jupyter" should start it with supported jupyter nbclassic from now on;
  3. Recommend the move to jupyter-lab to those who are feeling adventurous and want to try the new jupyter.
  4. Do nothing, wait for folks to complain, and point them to 1. Upstream may fix this in a week or so and probably some that are not updating constantly people will never hit this issue.

What do you think?

@MathewBiddle
Copy link
Contributor Author

1, 2, and 3?

  1. Update our environment so we're not giving folks something that is broken.
  2. Add a note on what to do if it is broken (could be as simple as adding a screenshot+note to the appendix). As documented in this issue.
  3. In the additional note from (2), include a feeling adventurous option for jupyter-lab, but keep it short and link to jupyter-lab docs.

Is that too much?

@ocefpaf
Copy link
Member

ocefpaf commented Mar 27, 2023

Is that too much?

Nope. Makes sense. I'll start sending PRs ASAP.

This was referenced Mar 27, 2023
@ocefpaf
Copy link
Member

ocefpaf commented Mar 31, 2023

I think we implemented all the steps here. Should we close this one?

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

No branches or pull requests

2 participants