Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter console broken on latest conda-forge. Regression from jupyter_client-7.0.2 #251

Open
slonik-az opened this issue Sep 14, 2021 · 3 comments

Comments

@slonik-az
Copy link

At least on MacOS jupyter console 6.4.0 is broken on fresh install from conda-forge. Regression seems to be caused by jupyter_client 7.0.2. Downgrading jupyter_client from 7.0.2 to 6.1.12 seems to resolve the problem.

How to reproduce

  1. Fresh install from conda-forge
    $ conda create -c conda-forge -n exp python=3.9 jupyter
  2. Activate newly created environment
    $ conda activate exp
  3. Start jupyter console and then hit enter
    $ jupyter console
    <hit ENTER>

Output

Click to expand
Jupyter console 6.4.0

Python 3.9.7 | packaged by conda-forge | (default, Sep 14 2021, 01:18:03)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.27.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: /opt/mambaforge/envs/exp/lib/python3.9/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 "/opt/mambaforge/envs/exp/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/opt/mambaforge/envs/exp/lib/python3.9/site-packages/prompt_toolkit/input/vt100.py", line 168, in callback_wrapper
    callback()
  File "/opt/mambaforge/envs/exp/lib/python3.9/site-packages/prompt_toolkit/application/application.py", line 691, in read_from_input
    self.key_processor.process_keys()
  File "/opt/mambaforge/envs/exp/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 274, in process_keys
    self._process_coroutine.send(key_press)
  File "/opt/mambaforge/envs/exp/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
    self._call_handler(matches[-1], key_sequence=buffer[:])
  File "/opt/mambaforge/envs/exp/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 329, in _call_handler
    handler.call(event)
  File "/opt/mambaforge/envs/exp/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 102, in call
    result = self.handler(event)
  File "/opt/mambaforge/envs/exp/lib/python3.9/site-packages/jupyter_console/ptshell.py", line 475, in _
    self.handle_iopub()
  File "/opt/mambaforge/envs/exp/lib/python3.9/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...

Workaround

Downgrading to jupyrer_client 6.1.12 seems to solve the problem
$ conda install -c conda-forge jupyter_client=6.1.12
$ jupyter console
Seems to be working OK now.

@slonik-az
Copy link
Author

Thanks to @davidbrochart for pointing to PR #244
that seems to address the root cause of the issue migrating from jupyter_client 6.x to 7.x.

@NeilGirdhar
Copy link

NeilGirdhar commented Nov 23, 2021

So this is fixed, right?

@davidbrochart
Copy link
Member

Yes but not released yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants