Recent update of py-tornado to 5.1.1 broke jupyter-notebook with the
error below.
[E 14:09:57.987 NotebookApp] Uncaught exception GET
/api/kernels/1d0a9a49-8d76-4cf9-8948-c4983a3c81d5/channels?session_id=63D301DA4CB645F59EEEC4ACC6B55273
(::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET',
uri='/api/kernels/1d0a9a49-8d76-4cf9-8948-c4983a3c81d5/channels?session_id=63D301DA4CB645F59EEEC4ACC6B55273',
version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/tornado/websocket.py", line
546, in _run_callback
result = callback(*args, **kwargs)
File
"/usr/local/lib/python3.7/site-packages/notebook/services/kernels/handlers.py",
line 262, in open
super(ZMQChannelsHandler, self).open()
File
"/usr/local/lib/python3.7/site-packages/notebook/base/zmqhandlers.py", line
176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
Diff below fixes the issue.
OK?
diff --git www/jupyter-notebook/Makefile www/jupyter-notebook/Makefile
index e95f27126ed..d632fc735c0 100644
--- www/jupyter-notebook/Makefile
+++ www/jupyter-notebook/Makefile
@@ -3,6 +3,7 @@
COMMENT = web-based notebook for interactive computing
MODPY_EGG_VERSION = 5.0.0
+REVISION = 0
DISTNAME = notebook-${MODPY_EGG_VERSION}
PKGNAME = jupyter-notebook-${MODPY_EGG_VERSION}
diff --git www/jupyter-notebook/patches/patch-notebook_base_zmqhandlers_py
www/jupyter-notebook/patches/patch-notebook_base_zmqhandlers_py
new file mode 100644
index 00000000000..8cf1459b782
--- /dev/null
+++ www/jupyter-notebook/patches/patch-notebook_base_zmqhandlers_py
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Fix issue with py-tornado-5:
+
+TypeError: __init__() got an unexpected keyword argument 'io_loop'
+
+Index: notebook/base/zmqhandlers.py
+--- notebook/base/zmqhandlers.py.orig
++++ notebook/base/zmqhandlers.py
+@@ -173,7 +173,7 @@ class WebSocketMixin(object):
+ self.last_ping = loop.time() # Remember time of last ping
+ self.last_pong = self.last_ping
+ self.ping_callback = ioloop.PeriodicCallback(
+- self.send_ping, self.ping_interval, io_loop=loop,
++ self.send_ping, self.ping_interval,
+ )
+ self.ping_callback.start()
+ return super(WebSocketMixin, self).open(*args, **kwargs)