question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR:tornado.general:Uncaught exception in ZMQStream callback

See original GitHub issue

Description

What steps will reproduce the problem?

  1. Open spyder.
  2. Tries to connect to the kernel.
  3. 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:closed
  • Created 6 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

40reactions
xiaokunxcommented, Aug 9, 2018

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.

22reactions
Qbertocommented, Aug 14, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Notebook dead Kernel after Anaconda update
To fix this problem, one can manually install the newest version of tornado : conda install tornado --update. or re-install jupyter notebook ...
Read more >
ERROR:tornado.general:Uncaught exception in ZMQStream ...
ERROR:tornado.general:Uncaught exception in ZMQStream callback ValueError: signal only works in main thread ERROR:tornado.general:Uncaught ...
Read more >
1.7.3 [win10] Error in console and python interpreter dies until ...
I don't think I did a full reboot after the last error. ... 12:35:48 ERROR:tornado.general:Uncaught exception in ZMQStream callback
Read more >
Unable to run IJulia after IPython upgrade - Google Groups
ERROR:tornado.application:Exception in callback functools.partial(<function wrap. ... ERROR:tornado.general:Uncaught exception, closing connection.
Read more >
ERROR:tornado.general:Uncaught exception in ZMQStream ...
ERROR :tornado.general:Uncaught exception in ZMQStream callback. jupyter. 15 January 2019 Posted by mdivk. Hello,. We already implemented JupyterHub in our ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found