Jupyter notebook kernel cannot be connected

fpfcorp 13/10/2021 1812

ValueError: The signal is only valid in the main thread /ioloop.py", line 759, in the _run_callback ret = callback() file "/Users/xxx/anaconda2/lib/python2.7/site- packages/tornado/stack_context.py", line 276, return fn( *args, **kwargs) file in null_wrapper "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream .py", line 536, in self.io_loop.add_callback(lambda: self._handle_events (self.socket, 0)) file "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop /zmqstream.py", line 450, in _handle_events self._handle_recv() file "/Users /xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 480, In _handle_recv self._run_callback(callback, msg) file "/Users/xxx/anaconda2/lib/python2. 7/site-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback callback(*args, * *kwargs) File "/Users/xxx/anaconda2/l ib/python2.7/site-packages/tornado/stack_context.py", line 276, return fn(*args, **kwargs) file in null_wrapper "/ Users/xxx/anaconda2/lib/python2.7/site-packages /ipykernel/kernelbase.py", line 283, returns s in the scheduler elf.dispatch_shell(stream, msg) file "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell self.pre_handler_hook() file "/Users/ xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 248, in pre_handler_hook self.saved_sigint_handler = signal(SIGINT, default_int_handler)ValueError: The signal is only valid in the main thread [I 19: 03:26.685 NotebookApp] KernelRestarter: Restart the kernel (1/5), new random port Traceback (last call): file "/Users/xxx/anaconda2/lib/python2.7 /runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals file "/Users/xxx/anaconda2/ lib/python2.7/site-packages /ipykernel_launcher.py", line 16, in the app.launch_new_instance() file "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application. py", line 658, in the launch_instance application. start() file "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start ioloop.IOLoop.instance().start() file "/Users /xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start raise RuntimeError("IOLoop is already running")RuntimeError: IOLoop is already running[I 19:03:29.696 NotebookApp] KernelRestarter: Restart the kernel (2/5), new random port Traceback (last call last time): file "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, In _run_module_as_main "__main__", fname, loader, pkg_name) file "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/xxx/ anaconda2/lib/python2.7/ site-packages/ipykernel_launcher.py", line 16, in the app.launch_new_instance() file "/Users/xxx/anaconda2/lib/py thon2.7/site-packages/traitlets/ config/application.py", line 658, in the launch_instance app.start() file "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, at the beginning ioloop.IOLoop.instance().start() file "/Users/xxx/anaconda2/lib/pytho n2.7/site-packages/tornado/ioloop.py", line 928, at the beginning raise RuntimeError("IOLoop is already running")RuntimeError: IOLoop is already running[I 19:03:32.712 NotebookApp] KernelRestarter: restart Kernel (3/5), new random port traceback (last call): file "/Users/ xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader , pkg_name) file "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, _run_code exec code in run_globals file "/Users/xxx/anaconda2/lib/python2.7/site -packages/ipykernel_launcher.py", line 16, "/Users/xxx/anaconda2 /lib/python2.7/site-packages/traitlets/config/application.py" in the app.launch_new_instance() file, line 658 , In the file "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py" in launch_instance app.start(), line 477, at the beginning of ioloop.IOLoop.instance().start () File "/Users/xxx/anaconda2 /lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start raise RuntimeError("IOLoop is already running")RuntimeError: IOLoop is already running[ W 19:03:33.717 NotebookApp] Timeout waiting 2cf24420-719b-4666-ad9f-fcdf8db505f3[E 19:03:33.721 NotebookApp]’s kernel_info reply, uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505fc3 (recent T file callback): " /Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback result = callback(*args, **kwargs) file "/Users/xxx/anaconda2 /lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open super(ZMQChannelsHandler, self).open() File "/Users/xxx/anaconda2/lib/python2. 7 /site-packages/notebook/base/zmqhandlers.py", line 176, open self.send_ping, self.ping_interval, io_ loop=loop, TypeError: __init__() got an unexpected keyword argument'io_loop'[E 19: 03:34.749 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels call Traceback last): File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ websocket.py", line 498, in the _run_callback result = callback(*args, **kwargs) file "/Users/ xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers. py", line 2 62, in open super(ZMQChannelsHandler, self).open() File "/Users/xxx/anaconda2/lib /python2.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'[I 19:03:35.724 NotebookApp] KernelRestarter: Restart the kernel (4/5), new random port [E 19: 03:35.771 NotebookApp] Uncaught exception /api/kernels/2cf24420-719b-4666-ad9f-fcdf38db50s last call): file "/Users/xxx/anaconda2/lib/pyt hon2.7/site-packages/tornado/ websocket.py", line 498, in the _run_callback result = callback(*args, **kwargs) file "/Users/xxx/anaconda2/lib/python2.7/site-packages/ notebook/services/kernels/handlers. py", line 262, in open super(ZMQChannelsHandler, self).open() File "/Users/xxx/anaconda2/lib/python2.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'Traceback (most recent call last): File "/Users/xxx/anaconda2 /lib/pyt hon2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) file "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, In the _run_code exec code in the run_globals file "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in the app.launch_new_instance() file "/Users/xxx /anaconda2/lib/ python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance app.start() file"/Users/xxx/a naconda2/lib/python2.7/site- packages/ipykernel/kernelapp.py", line 477, at the beginning of the ioloop.IOLoop.instance().start() file "/Users/xxx/anaconda2/lib/python2.7/ site-packages/tornado/ioloop.py ", line 928, in start raise RuntimeError("IOLoop is already running")RuntimeError: IOLoop is already running[E 19:03:36.791 NotebookApp] Uncaught exception in /api/kernels/2cf24420 -719b-4666-ad9f-fcdf8db505f3/ channels Traceback (the last call): file "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, _run_callback result = callback(*args, **kwargs) File "/Users/xxx/anaconda2/lib/pyth on2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open super(ZMQChannelsHandler, self ).open() file "/Users/xxx/anaconda2/lib/python2.7/site -packages/notebook/base/zmqhandlers.py", line 176, open self.send_ping, self.ping_interval, io_loop=loop, type error: __init__() got an unexpected keyword parameter "io_loop" [E 19: 03:37.810 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels Traceback (last call): file "/Users/xxx/anaconda2/lib/python2.7/site- packages/tornado/websocket.py", line 498, in _run_callback result = callback(*args, **kwargs) file "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/ kernels/handlers.py", line 262, open the super(ZMQChannelsHandler, self).open() file "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py" , Line 176, open self.send_ping, self .ping_interval, io_loop=loop, TypeError: __init__() got an unexpected keyword argument'io_loop'[W 19:03:38.733 NotebookApp] KernelRestarter: restart failed[W 19:03 :38.733 NotebookApp] Kernel 2cf24420 -66619 -fcdf8db505f3 is dead and removed from the map. [W 19:03:38.830 NotebookApp] 404 GET /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels?session_id=3F7865F370D:3F7865F370D:3F785FC370DBF3F785F37010D 2cf824420-719b-4666-db03505:fc 38.838 NotebookApp]? 404 GET / API / Kernel / 2cf24420-719b-4666-ad9f-fcdf8db505f3 / session_id of the channel = 3F75F379F865488D8379D3BB7FC0BF0F (:: 1) 12.00ms referral = None [W 19:03:40.859 NotebookApp] Replace outdated connection: 2cf24420-719b-4666 -ad9f-fcdf8db505f3:3F75F379F865488D8379D3BB7FC0BF0F

Latest: Why don't I use Jupyter notebook and neither should you

Next: Jupyter notebook

Related Articles