jupyter_console: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
Hello. When I run Jupyter console on Ubuntu 18.04, I get:
Jupyter console 6.1.0
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
So far so good. But what the command I then type, I get:
/usr/local/lib/python3.6/dist-packages/jupyter_console/ptshell.py:718: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
while self.client.iopub_channel.msg_ready():
Unhandled exception in event loop:
File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/home/mp/.local/lib/python3.6/site-packages/prompt_toolkit/input/vt100.py", line 168, in callback_wrapper
callback()
File "/home/mp/.local/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 691, in read_from_input
self.key_processor.process_keys()
File "/home/mp/.local/lib/python3.6/site-packages/prompt_toolkit/key_binding/key_processor.py", line 274, in process_keys
self._process_coroutine.send(key_press)
File "/home/mp/.local/lib/python3.6/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
self._call_handler(matches[-1], key_sequence=buffer[:])
File "/home/mp/.local/lib/python3.6/site-packages/prompt_toolkit/key_binding/key_processor.py", line 329, in _call_handler
handler.call(event)
File "/home/mp/.local/lib/python3.6/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 102, in call
result = self.handler(event)
File "/usr/local/lib/python3.6/dist-packages/jupyter_console/ptshell.py", line 377, in _
self.handle_iopub()
File "/usr/local/lib/python3.6/dist-packages/jupyter_console/ptshell.py", line 720, in handle_iopub
msg_type = sub_msg['header']['msg_type']
Exception 'coroutine' object is not subscriptable
Press ENTER to continue...
Note that this is also the case with another kernel, and that Jupyter lab works. The problem seems to come from Jupyter console. Any idea how to handle this?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 21
- Comments: 18 (1 by maintainers)
Commits related to this issue
- fix iruby error - https://github.com/SciRuby/iruby#requirements - https://github.com/jupyter/jupyter_console/issues/241 — committed to shmilee/web-in-docker by shmilee 3 years ago
- Try pinning jupyter_client to a previous version Per https://github.com/jupyter/jupyter_console/issues/241#issuecomment-846147727 I'm not sure if this is directly related or not. Currently I know th... — committed to ramenbytes/phconvert by ramenbytes 3 years ago
- due to issue 241 I had to specify jupter-client version 6.1.12, see https://github.com/jupyter/jupyter_console/issues/241 Former-commit-id: 1ed040590619991d51c7912f44b04330ffd8261c — committed to paulgeser/test by Accio 2 years ago
- due to issue 241 I had to specify jupter-client version 6.1.12, see https://github.com/jupyter/jupyter_console/issues/241 — committed to paulgeser/besca-truncated by Accio 2 years ago
After lots of trial-and-errors with different versions of pyzmq, prompt-toolkit, jupyter_client, jupyter_console, I’ve recovered jupyter-console. That was indeed a dependency hell problem.
Unclear what the actual fix is. Maybe downgrading
jupyter-client 6.2.0
tojupyter-client 6.1.12
.On python3.7, downgrading from jupyter-client 7.0.1 to 6.1.12 worked for me.
Getting the same issue in a fresh install of Ubuntu 21.04, python 3.9.5, using Anaconda as installer. Downgrading to 6.1.12 also worked for me (
conda install jupyter_client=6.1
). Let me know if there’s any way I can help address this issue.I have a similar issue; a Void Linux contributor has PR’ed an omnipus jupyter update and running
jupyter console
triggers theRuntimeWarning
aboutZMQSocketChannel.msg_ready
not being awaited. Downgrading onlypython3-jupyter_client
to6.1.0_2
(the version currently packaged in Void) resolves the issue.PyZMQ is installed via the
python3-pyzmq-22.1.0_1
package in Void, although an earlier version also triggered the issue.Edit: Void update PR: https://github.com/void-linux/void-packages/pull/30873
Same issue here! Mac OS 11.6. Homebrew Python 3.10.0 and 3.9.7, and Perl 5.34.0. Trying to use IPerl kernel. Fixed by downgrading jupyter_client to 6.1.12 via
pip3 install -Iv jupyter_client==6.1.12
.3.10.0:
3.9.7:
Yeah it’s working for me now on macOS. Stellar, thank you.
Reproduced on MacOs python 3.9.9 iTerm2 Build 3.4.14
Isn’t this fixed by https://github.com/jupyter/jupyter_console/pull/244?