jupyter_console icon indicating copy to clipboard operation
jupyter_console copied to clipboard

Tracebacks after running any command

Open MrMino opened this issue 4 years ago • 2 comments

After running jupyter console and running any cell, an exception gets raised. See traceback below.

Environment:

  • Ubuntu 20.04.2 LTS
  • Python 3.8.10 / 3.9.1
  • IPython 7.25.0 / 8.0.0.dev (master)
  • jupyter-client==6.2.0
    jupyter-console==6.4.0
    jupyter-core==4.7.1
    

Traceback:

In [1]: /home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/jupyter_console/ptshell.py:852: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
  while self.client.iopub_channel.msg_ready():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Unhandled exception in event loop:
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/prompt_toolkit/input/vt100.py", line 168, in callback_wrapper
    callback()
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/prompt_toolkit/application/application.py", line 691, in read_from_input
    self.key_processor.process_keys()
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/prompt_toolkit/key_binding/key_processor.py", line 274, in process_keys
    self._process_coroutine.send(key_press)
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
    self._call_handler(matches[-1], key_sequence=buffer[:])
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/prompt_toolkit/key_binding/key_processor.py", line 329, in _call_handler
    handler.call(event)
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 102, in call
    result = self.handler(event)
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 475, in _
    self.handle_iopub()
  File "/home/mrmino/.pyenv/versions/3.7.9/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 854, in handle_iopub
    msg_type = sub_msg['header']['msg_type']

Exception 'coroutine' object is not subscriptable
Press ENTER to continue...

MrMino avatar Jul 23 '21 15:07 MrMino

I get completely the same error. I tried different computers with different linux distrubutions(Ubuntu, Mint, Manjaro KDE, Manjaro XFCE). I tried different python versions (>3.6), different ipython verions and even with Docker.

Interesting that jupyter-qtconsole ,jupyter-notebook and ipython are working fine.

igivis7 avatar Dec 11 '21 19:12 igivis7

the problem is solved here: github topic

Short version of solution is to downgrade the jupyter-client: pip install jupyter-client==6.1.12

igivis7 avatar Dec 11 '21 19:12 igivis7