Describe the bug
In jupyter-notebook, a kernel restart of a Notebook that uses the sos-kernel (i.e. those notebooks that contain Python AND Ruta code), fails with the following error.
[I 15:34:13.004 NotebookApp] Restoring connection for b0ce13e9-f374-4227-8fb7-9d147ea3f178:696ef6b3b33746d89f672c689160fccc
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/site-packages/sos_notebook/kernel.py", line 1956, in <module>
IPKernelApp.launch_instance(kernel_class=SoS_Kernel)
File "/usr/local/lib/python3.8/site-packages/traitlets/config/application.py", line 844, in launch_instance
app.initialize(argv)
File "/usr/local/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 567, in initialize
self.init_sockets()
File "/usr/local/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 271, in init_sockets
self.shell_port = self._bind_socket(self.shell_socket, self.shell_port)
File "/usr/local/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 218, in _bind_socket
return self._try_bind_socket(s, port)
File "/usr/local/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 194, in _try_bind_socket
s.bind("tcp://%s:%i" % (self.ip, port))
File "/usr/local/lib/python3.8/site-packages/zmq/sugar/socket.py", line 172, in bind
super().bind(addr)
File "zmq/backend/cython/socket.pyx", line 540, in zmq.backend.cython.socket.Socket.bind
File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Address already in use
Afterwards, if the dead kernel is restarted, it works.
Describe the bug In jupyter-notebook, a kernel restart of a Notebook that uses the sos-kernel (i.e. those notebooks that contain Python AND Ruta code), fails with the following error.
Afterwards, if the dead kernel is restarted, it works.
To Reproduce Steps to reproduce:
docker build -t iruta
docker run -p 8888:8888 iruta
Notebook [IRuta, IPython] - How to combine Ruta and Python
Steps to solve the problem It seems that there is a bug in sos-notebook. I made a ticket there: https://github.com/vatlab/sos-notebook/issues/317
Alternatively, it seems that this error does not exist in JupyterLab.
Versions