Jupyter books not working

Hello All!

Has anybody hit the problem whereby a Jupyter notebook fails to connect to the kernel? I’m getting the following message in a pop-up:
A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration.

There appears to be a problem with anaconda. The following errors are displayed in the terminal window where jupyter is started:
[I 17:28:43.196 NotebookApp] Kernel started: d25b05fb-c43f-4646-bf15-ff49ee490f93
[E 17:28:43.939 NotebookApp] Uncaught exception GET /api/kernels/d25b05fb-c43f-4646-bf15-ff49ee490f93/channels?session_id=abe49d0d2d08488e85f6ef8914e91580 (127.0.0.1)
HTTPServerRequest(protocol=‘http’, host=‘localhost:8888’, method=‘GET’, uri=’/api/kernels/d25b05fb-c43f-4646-bf15-ff49ee490f93/channels?session_id=abe49d0d2d08488e85f6ef8914e91580’, version=‘HTTP/1.1’, remote_ip=‘127.0.0.1’)
Traceback (most recent call last):
File “/Users/admin/opt/anaconda3/lib/python3.7/site-packages/tornado/websocket.py”, line 956, in accept_connection
open_result = handler.open(*handler.open_args, **handler.open_kwargs)
File “/Users/admin/opt/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/handlers.py”, line 274, in open
self.create_stream()
File “/Users/admin/opt/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/handlers.py”, line 127, in create_stream
meth = getattr(km, 'connect
’ + channel)
AttributeError: ‘MappingKernelManager’ object has no attribute ‘connect_control’

This looks different to a topic raised back in October of last year. That appeared to relate to a problem with the prompt-toolkit.

Cheers!!

Dermot

2 Likes

Okay! Fixed it! I had to run the following from within the conda environment:
pip install --upgrade jupyter-client jupyter-core

Cheers!!

Dermot

1 Like

Same problem, thanks for the solution.

1 Like