AttributeError: 'MappingKernelManager' object has no attribute 'notify_disconnect'
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
I'm using Amazon EMR, have been using Jupyter for a while, and this bug only occurs in notebook version 5.0.0 (when downgrading doesn't happen)
System Info:
> Python 2.7.12 (default, Sep 1 2016, 22:14:00)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Package was installed through
> sudo pip install jupyter
The error happens upon startup (and happens every second):
[E 08:38:26.922 NotebookApp] Uncaught exception GET /api/kernels/178bc25f-a0df-45b8-8f2b-fc20981b5442/channels?session_id=BBA1AF96CF8E409F9D7B9B719FF8BC4C (PC_IP)
HTTPServerRequest(protocol='http', host='SERVER_ADDRESS:8192', method='GET', uri='/api/kernels/178bc25f-a0df-45b8-8f2b-fc20981b5442/channels?session_id=BBA1AF96CF8E409F9D7B9B719FF8BC4C', version='HTTP/1.1', remote_ip='PC_IP', headers={'Origin': 'SERVER_ADDRESS:8192', 'Upgrade': 'websocket', 'Accept-Language': 'en-US,en;q=0.8,he;q=0.6', 'Accept-Encoding': 'gzip, deflate, sdch', 'Sec-Websocket-Version': '13', 'Host': 'SERVER_ADDRESS:8192', 'Sec-Websocket-Key': '60sPxVJH55FRmcfiWa4rLg==', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36', 'Connection': 'Upgrade', 'Cookie': '_xsrf=2|0ce7cbe4|39bf26da05bb4ba993796fae6865dcd2|1491812725; username-SERVER_ADDRESS-8192="2|1:0|10:1491812736|56:username-SERVER_ADDRESS-8192|44:MTg4YzU2MWY2ZjgwNGM2MDhhZTM4OTQzZjBmZWFiZDE=|4b874c578a0b1f0ad6022446077262ea093c4c19e9fc6c69e332a0488cc55797"', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Sec-Websocket-Extensions': 'permessage-deflate; client_max_window_bits'})
Traceback (most recent call last):
File "/usr/local/lib64/python2.7/site-packages/tornado/web.py", line 1425, in _stack_context_handle_exception
raise_exc_info((type, value, traceback))
File "/usr/local/lib64/python2.7/site-packages/tornado/stack_context.py", line 314, in wrapped
ret = fn(*args, **kwargs)
File "/usr/local/lib64/python2.7/site-packages/tornado/websocket.py", line 364, in on_connection_close
self.on_close()
File "/usr/local/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 405, in on_close
km.notify_disconnect(self.kernel_id)
AttributeError: 'MappingKernelManager' object has no attribute 'notify_disconnect'
(Replaced my PC's IP with PC_IP, and server address with SERVER_ADDRESS)
Any idea what might cause it?
Contributor guide
Research direction
Start with notebook/services/kernels/handlers.py at the on_close call shown in the traceback, then inspect the MappingKernelManager API used by that handler. Reproduce the startup websocket disconnect on notebook 5.0.0 and verify that it no longer emits the repeated AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100