Closed Praful closed 1 year ago
Hey there. Commenting because I've got the exact same problem. Note that my install is older, and everything used to work just fine (i don't use jupyter very often so I can't say when it all started not working. A few tests I did : I have a 3.7 python interpreter (created with pyenv). I tried creating two venv, one on 3.7, one on the latest version on my system. Jupyter console runs fine on 3.7 interpreter, but the issue is there on 3.10 venv. Here is my test :
(test) julien@archdesktop[.venv](master) > python --version
Python 3.7.16
(test) julien@archdesktop[.venv](master) > jupyter console --show-config | grep output
.include_other_output = True
[IPKernelApp] WARNING | Parent appears to have exited, shutting down.
(test) julien@archdesktop[.venv](master) > jupyter console
Jupyter console 6.5.1
Python 3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.10.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: quit()
Shutting down kernel
(test) julien@archdesktop[.venv](master) > which jupyter
/home/julien/.venv/test/bin/jupyter
(test) julien@archdesktop[.venv](master) > source test2/bin/activate
(test2) julien@archdesktop[.venv](master) > python --version
Python 3.10.9
(test2) julien@archdesktop[.venv](master) > jupyter console --show-config | grep output
.include_other_output = True
[IPKernelApp] WARNING | Parent appears to have exited, shutting down.
(test2) julien@archdesktop[.venv](master) > jupyter console
Jupyter console 6.5.1
Python 3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.10.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
Task exception was never retrieved
future: <Task finished name='Task-7' coro=<ZMQTerminalInteractiveShell.handle_external_iopub() done, defined at /home/julien/.venv/test2/lib/python3.10/site-packages/jupyter_console/ptshell.py:839> exception=TypeError("object int can't be used in 'await' expression")>
Traceback (most recent call last):
File "/home/julien/.venv/test2/lib/python3.10/site-packages/jupyter_console/ptshell.py", line 842, in handle_external_iopub
poll_result = await self.client.iopub_channel.socket.poll(500)
TypeError: object int can\'t be used in 'await' expression
Shutting down kernel
(test2) julien@archdesktop[.venv](master) > which jupyter
/home/julien/.venv/test2/bin/jupyter
Same as OP, qtconsole is working fine in both instances. Since I had a problem before with conflicts between pip installed packages and pacman installed packages, I also checked that I didn't have any conflicted version of packages. I have the habit of installing anything through pacman on archlinux, nothing comes from pip when I'm not in a venv. I did check, there were a few packages I had installed from pip - (listed with pip list -v) that had nothing to do with this, but I uninstalled them anyways : nothing changed).
Same problem and use case as OP. And the problem appears after an upgrade.
I have the same problem when launching from the commandline:
jupyter console --existing --ZMQTerminalInteractiveShell.include_other_output=true
The issue started happening in jupyter-client==8.0.0a0
. If you downgrade to jupyter-client==7.4.9
everything starts to work again.
Don't know if this is just me, but this did not fully resolve the issue. With the new version, jupyter-console is not automatically exiting with the same error anymore. Instead, once the console is fully loaded and the expected TUI appears, the terminal completely freezes, I can't type any command, can't exit with ctrl+d and have to hard kill the whole terminal. This only happens with the aforementioned option
c.ZMQTerminalInteractiveShell.include_other_output = True
Reopening, but it may be a bit before I can investigate.
Of course. Thanks for your help and attention, and when you're ready please ask if you need any help (I'm not skilled enough to debug this, but I can provide logs and other useful informations if need be). @Praful , @zcysxy , @overfl0 , before any dev spends time on this, maybe you could confirm if this issue is resolved on your side (it might be something wrong on my computer) ?
Can confirm in the newest version, the program freezes instead of throwing an error.
I've just updated to 6.6.2. The bad news is that, once started, the console is frozen at the In [1]:
prompt as @jcrespy describes above. However, I can now connect to it from vim and send commands. We're halfway there :)
Thanks @blink1073 for looking at this issue.
This may be related to https://github.com/jupyter/jupyter_console/issues/247.
If I create a minimalist
jupyter_console_config.py
with just these lines:The following error occurs when I run
jupyter_console
:This setting is required to use the jupyter-vim plugin.
I have done the same in
jupyter_qtconsole_config.py
and all is fine. For now, I'm runningjupyter qtconsole
.The output of
jupyter console --show-config
is:Here is my system info: