ERROR:tornado.general:Uncaught exception in ZMQStream callback
See original GitHub issueDescription
What steps will reproduce the problem?
- Open spyder.
- Tries to connect to the kernel.
- Shows the error.
What is the expected output? What do you see instead?
An error ocurred while starting the kernel ERROR:tornado.general:Uncaught exception in ZMQStream callback Traceback (most recent call last): File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 432, in _run_callback callback(*args, **kwargs) File “/usr/local/lib/python3.5/dist‑packages/tornado/stack_context.py”, line 276, in null_wrapper return fn(*args, **kwargs) File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 283, in dispatcher return self.dispatch_shell(stream, msg) File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 233, in dispatch_shell self.pre_handler_hook() File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 248, in pre_handler_hook self.saved_sigint_handler = signal(SIGINT, default_int_handler) File “/usr/lib/python3.5/signal.py”, line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread ERROR:tornado.general:Uncaught exception in zmqstream callback Traceback (most recent call last): File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 450, in _handle_events self._handle_recv() File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 480, in _handle_recv self._run_callback(callback, msg) File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 432, in _run_callback callback(*args, **kwargs) File “/usr/local/lib/python3.5/dist‑packages/tornado/stack_context.py”, line 276, in null_wrapper return fn(*args, **kwargs) File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 283, in dispatcher return self.dispatch_shell(stream, msg) File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 233, in dispatch_shell self.pre_handler_hook() File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 248, in pre_handler_hook self.saved_sigint_handler = signal(SIGINT, default_int_handler) File “/usr/lib/python3.5/signal.py”, line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread ERROR:tornado.application:Exception in callback functools.partial(.null_wrapper at 0x7f95db138f28>) Traceback (most recent call last): File “/usr/local/lib/python3.5/dist‑packages/tornado/ioloop.py”, line 760, in _run_callback ret = callback() File “/usr/local/lib/python3.5/dist‑packages/tornado/stack_context.py”, line 276, in null_wrapper return fn(*args, **kwargs) File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 536, in self.io_loop.add_callback(lambda : self._handle_events(self.socket, 0)) File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 450, in _handle_events self._handle_recv() File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 480, in _handle_recv self._run_callback(callback, msg) File “/usr/local/lib/python3.5/dist‑packages/zmq/eventloop/zmqstream.py”, line 432, in _run_callback callback(*args, **kwargs) File “/usr/local/lib/python3.5/dist‑packages/tornado/stack_context.py”, line 276, in null_wrapper return fn(*args, **kwargs) File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 283, in dispatcher return self.dispatch_shell(stream, msg) File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 233, in dispatch_shell self.pre_handler_hook() File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelbase.py”, line 248, in pre_handler_hook self.saved_sigint_handler = signal(SIGINT, default_int_handler) File “/usr/lib/python3.5/signal.py”, line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread Traceback (most recent call last): File “/home/adityamagarde/.local/lib/python3.5/site‑packages/spyder/utils/ipython/start_kernel.py”, line 241, in main() File “/home/adityamagarde/.local/lib/python3.5/site‑packages/spyder/utils/ipython/start_kernel.py”, line 237, in main kernel.start() File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelapp.py”, line 477, in start ioloop.IOLoop.instance().start() File “/usr/local/lib/python3.5/dist‑packages/tornado/platform/asyncio.py”, line 112, in start self.asyncio_loop.run_forever() File “/usr/lib/python3.5/asyncio/base_events.py”, line 340, in run_forever raise RuntimeError(‘Event loop is running.’) RuntimeError: Event loop is running. Traceback (most recent call last): File “/home/adityamagarde/.local/lib/python3.5/site‑packages/spyder/utils/ipython/start_kernel.py”, line 241, in main() File “/home/adityamagarde/.local/lib/python3.5/site‑packages/spyder/utils/ipython/start_kernel.py”, line 237, in main kernel.start() File “/home/adityamagarde/.local/lib/python3.5/site‑packages/ipykernel/kernelapp.py”, line 477, in start ioloop.IOLoop.instance().start() File “/usr/local/lib/python3.5/dist‑packages/tornado/platform/asyncio.py”, line 112, in start self.asyncio_loop.run_forever() File “/usr/lib/python3.5/asyncio/base_events.py”, line 340, in run_forever raise RuntimeError(‘Event loop is running.’) RuntimeError: Event loop is running.
Please provide any additional information below I recently installed jupyter. Even that isn’t working I guess.
Version and main components
- Spyder Version: 3.2.3
- Python Version: 3.5.2
- Qt Versions: 4.8.7, PyQt4 (API v2) 4.11.4 on Linux
Dependencies
pyflakes >=0.6.0 : 1.6.0 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.17.1 (OK)
numpy >=1.7 : 1.13.3 (OK)
sphinx >=0.6.6 : 1.6.4 (OK)
rope >=0.9.4 : 0.10.7 (OK)
jedi >=0.9.0 : 0.11.0 (OK)
psutil >=0.3 : 5.3.1 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
sympy >=0.7.3 : None (NOK)
cython >=0.21 : None (NOK)
qtconsole >=4.2.0: 4.3.1 (OK)
IPython >=4.0 : 6.2.1 (OK)
pylint >=0.25 : 1.7.4 (OK)
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (3 by maintainers)
Top GitHub Comments
downgrading tornado to 4.5.3 does not solve the problem, upgrading ipykernel from 4.6.1 to 4.8.2 solve the problem for me.
Like @xiaokunx, downgrading tornado to 4.5.3 did not resolve the issue for me, while upgrading ipykernel solved the problem.
conda upgrade ipykernel
should do the trick.