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.

Spyder 5.3.1 hangs forever "connecting to kernel..." with jupyter_client 7.3.2 and 7.3.3

See original GitHub issue

Issue Report Checklist

  • [x ] Searched the issues page for similar reports
  • [ x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • [x ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • [x ] Tried basic troubleshooting (if a bug/error)
    • [x ] Restarted Spyder
    • [x ] Reset preferences with spyder --reset
    • [ x] Reinstalled the latest version of Anaconda
    • [x ] Tried the other applicable steps from the Troubleshooting Guide
  • [x ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

I installed spyder in a fresh ubuntu mate 22.04 install and the following problem arrises: When invoking “spyder &” in the console the following errors are shown

mariano@dplab1:~$ spyder & [4] 26243 mariano@dplab1:~$ fromIccProfile: failed minimal tag size sanity /usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release warnings.warn( /usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release warnings.warn( /usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release warnings.warn( ERROR:tornado.general:Uncaught exception in ZMQStream callback Traceback (most recent call last): File “/home/mariano/.local/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py”, line 556, in _run_callback callback(*args, **kwargs) File “/home/mariano/.local/lib/python3.10/site-packages/jupyter_client/threaded.py”, line 117, in _handle_recv ident, smsg = self.session.feed_identities(msg_list) File “/home/mariano/.local/lib/python3.10/site-packages/jupyter_client/session.py”, line 968, in feed_identities idx = msg_list.index(DELIM) AttributeError: ‘_asyncio.Future’ object has no attribute ‘index’ ERROR:tornado.general:Uncaught exception in zmqstream callback Traceback (most recent call last): File “/home/mariano/.local/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py”, line 577, in _handle_events self._handle_recv() File “/home/mariano/.local/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py”, line 606, in _handle_recv self._run_callback(callback, msg) File “/home/mariano/.local/lib/python3.10/site-packages/zmq/eventloop/zmqstream.py”, line 556, in _run_callback callback(*args, **kwargs) File “/home/mariano/.local/lib/python3.10/site-packages/jupyter_client/threaded.py”, line 117, in _handle_recv ident, smsg = self.session.feed_identities(msg_list) File “/home/mariano/.local/lib/python3.10/site-packages/jupyter_client/session.py”, line 968, in feed_identities idx = msg_list.index(DELIM) AttributeError: ‘_asyncio.Future’ object has no attribute ‘index’ ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(115, 1) handle: <Handle BaseAsyncIOLoop._handle_events(115, 1)>

[… lot more errrors …]

, but spyder starts (almost) correctly. The problem is that the ipython console hangs forever with the message “connecting to kernel…”. I can restart the kernel and the following appear:

Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0] Type “copyright”, “credits” or “license” for more information.

IPython 7.34.0 – An enhanced Interactive Python.

Restarting kernel…

but nothing else happen. Still hang there.

What steps reproduce the problem?

  1. start spyder from console
  2. thats all

What is the expected output? What do you see instead?

Start spyder normally and prompt in the console.

Paste Traceback/Error Below (if applicable)


Spyder Internal Console

This console is used to report application
internal errors and to inspect Spyder
internals with the following commands:
  spy.app, spy.window, dir(spy)

Please do not use it to run your code

>>> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.16.0-unknown is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(


Versions

  • Spyder version: 5.3.1 None
  • Python version: 3.10.4 64-bit
  • Qt version: 5.15.3
  • PyQt5 version: 5.15.6
  • Operating System: Linux 5.15.0-35-generic

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.1.0 (OK)
cookiecutter >=1.6.0          :  2.1.1 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1;<8.0.0       :  7.34.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.6.0 (OK)
keyring >=17.0.0              :  23.5.0 (OK)
nbconvert >=4.0               :  6.5.0 (OK)
numpydoc >=0.6.0              :  1.3.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.12.0 (OK)
pylint >=2.5.0                :  2.14.0 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.4.1;<1.5.0          :  1.4.1 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.3 (OK)
qstylizer >=0.1.10            :  0.2.1 (OK)
qtawesome >=1.0.2             :  1.1.1 (OK)
qtconsole >=5.3.0;<5.4.0      :  5.3.1 (OK)
qtpy >=2.1.0                  :  2.1.0 (OK)
rtree >=0.9.7                 :  1.0.0 (OK)
setuptools >=49.6.0           :  59.6.0 (OK)
sphinx >=0.6.6                :  5.0.1 (OK)
spyder_kernels >=2.3.1;<2.4.0 :  2.3.1 (OK)
textdistance >=4.2.0          :  4.2.2 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.8 (OK)
xdg >=0.26                    :  0.27 (OK)
zmq >=22.1.0                  :  23.1.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=3.0.0            :  None (NOK)
numpy >=1.7                   :  1.22.4 (OK)
pandas >=1.1.1                :  None (NOK)
scipy >=0.17.0                :  1.8.1 (OK)
sympy >=0.7.3                 :  1.10.1 (OK)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
jfprieurcommented, Jun 6, 2022

Hi @marianux and @jfprieur thank you for the feedback! Could you try to downgrade jupyter_client to 7.3.1 ? Seems like 7.3.2 was released a couple of hours ago and is causing this traceback. Let us know!

Thank you for the quick reply, downgrading to jupyter_client==7.3.1 did the trick!

5reactions
ccordoba12commented, Jun 8, 2022

This error is fixed now in jupyter_client 7.3.4. It’s already available on PyPI and it will be on Conda-forge in three or four hours.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ipython console in Spyder stuck on "connecting to kernel"
The problem that I have is that, each time I start Spyder, the default IPython console gets stuck on "connecting to kernel".
Read more >
devel/py-spyder-kernels: Jupyter kernels for the Spyder console
Provides Jupyter kernels for use with the consoles of Spyder, the Scientific Python Development Environment. These kernels can be launched ...
Read more >
Comparison between releases Mageia 6 and Mageia cauldron
This page compares the packages present in Mageia 6 with those in Mageia cauldron. It can be customized by using the filters available...
Read more >
Can Spyder and Jupyter Notebooks coexist in Arc Pro 3.0?
Solved: It would be nice to have both Spyder and Jupyter Notebooks both ... or the code opens with a kernel error (AttributeError:...
Read more >
Debian -- Details of package python-spyder-kernels in buster
Package: python-spyder-kernels (1.0.1+really0.2.4-1) · Links for python-spyder-kernels · Jupyter kernels for the Spyder console - Python 2 · Other Packages Related ...
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