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

Connecting to Kernal message for ever #15161

Closed
sananthv opened this issue Apr 7, 2021 · 5 comments
Closed

Connecting to Kernal message for ever #15161

sananthv opened this issue Apr 7, 2021 · 5 comments

Comments

@sananthv
Copy link

sananthv commented Apr 7, 2021

Description

What steps will reproduce the problem?

I installed spyder in windows 10 in a python virtual env. It gave the spyder kernal missing dependencies! error which I ignored. It is still saying that it is connecting to kernal and the loading circle is there for the last 10 minutes

Traceback

Traceback (most recent call last):
  File "c:\users\ananthselladoray\documents\pyvirenv1\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1323, in close_client
    self.create_new_client()
  File "c:\users\ananthselladoray\documents\pyvirenv1\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1007, in create_new_client
    self.connect_client_to_kernel(client, is_cython=is_cython,
  File "c:\users\ananthselladoray\documents\pyvirenv1\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1041, in connect_client_to_kernel
    km, kc = self.create_kernel_manager_and_kernel_client(
  File "c:\users\ananthselladoray\documents\pyvirenv1\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1506, in create_kernel_manager_and_kernel_client
    kernel_client.hb_channel.time_to_dead = 25.0
  File "c:\users\ananthselladoray\documents\pyvirenv1\lib\site-packages\jupyter_client\client.py", line 364, in hb_channel
    self._hb_channel = self.hb_channel_class(self.context, self.session, url)
  File "c:\users\ananthselladoray\documents\pyvirenv1\lib\site-packages\qtconsole\util.py", line 64, in __new__
    QClass.__init__(inst)
TypeError: __init__() missing 1 required positional argument: 'context'

Versions

  • Spyder version: 5.0.0
  • Python version: 3.9.1
  • Qt version: 5.12.10
  • PyQt5 version: 5.12.3
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.0 (OK)
cookiecutter >=1.6.0          :  1.7.2 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  7.22.0 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.0.1 (OK)
nbconvert >=4.0               :  6.0.7 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.7.2 (OK)
parso =0.7.0                  :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.8.1 (OK)
pylint >=1.0                  :  2.7.4 (OK)
pyls >=0.36.2;<1.0.0          :  0.36.2 (OK)
pyls_black >=0.4.6            :  0.4.6 (OK)
pyls_spyder >=0.3.2           :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=0.5.7             :  1.0.2 (OK)
qtconsole >=5.0.3             :  5.0.3 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
setuptools >=39.0.0           :  54.1.2 (OK)
sphinx >=0.6.6                :  3.5.3 (OK)
spyder_kernels >=2.0.1,<2.1.0 :  2.0.1 (NOK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0      :  1.0.2 (OK)
zmq >=17                      :  22.0.3 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=2.0.0            :  None (NOK)
numpy >=1.7                   :  None (OK)
pandas >=1.1.1                :  None (NOK)
scipy >=0.17.0                :  None (NOK)
sympy >=0.7.3                 :  None (NOK)
@ericpre
Copy link

ericpre commented Apr 7, 2021

Do you jupyter_client 6.1.13? If so, this seems to be due to the last release of jupyter_client and more specifically jupyter/jupyter_client#623.

@dalthviz
Copy link
Member

dalthviz commented Apr 7, 2021

Hi @sananthv thanks for the feedback! I think @ericpre could be in the right track here. Could you try downgrading jupyter_client and check again? Thanks!

Pinging @ccordoba12 just in case

@dalthviz
Copy link
Member

dalthviz commented Apr 7, 2021

Note: some more info provided by @slawomirmarczynski :

Description

After updating Anaconda Spyder 4.xx to 5.0 Spyder does run. Rollback to 4.15 don't fix this bug.

What steps will reproduce the problem?

MS Windows 10, drive c: is SSD, Intel I9 CPU, 32GB RAM, Anaconda installed "for user".

1. Install Anaconda

2. Add conda-forge as a channel

3. In Anaconda terminal:  conda update conda

4. In Anaconda terminal:  conda update --all

5. Run Spyder 5.0 - bug "no QTCore"

6. Unistall/downgrade Spyder to 4.15 (or 4.25)

7. Try run Spyder 4.15 - kaboom!!! - "we have problem"

Workaround:

1. Uninstall Anaconda, remove remaing files/dir (like .spyder-something, .conda etc.)

2. Install Anaconda

3. conda update conda   _or_  conda update --all

4. Do nothing - Spyder 4.15 works - ok

Traceback

  File "C:\Users\Slawek\anaconda3\lib\site-packages\spyder\plugins\base.py", line 327, in <lambda>
    toggled=lambda checked: self.toggle_view(checked),
  File "C:\Users\Slawek\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 214, in toggle_view
    self.create_new_client(give_focus=False)
  File "C:\Users\Slawek\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 709, in create_new_client
    self.connect_client_to_kernel(client, is_cython=is_cython,
  File "C:\Users\Slawek\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 743, in connect_client_to_kernel
    km, kc = self.create_kernel_manager_and_kernel_client(
  File "C:\Users\Slawek\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 1234, in create_kernel_manager_and_kernel_client
    kernel_client.hb_channel.time_to_dead = 25.0
  File "C:\Users\Slawek\anaconda3\lib\site-packages\jupyter_client\client.py", line 364, in hb_channel
    self._hb_channel = self.hb_channel_class(self.context, self.session, url)
  File "C:\Users\Slawek\anaconda3\lib\site-packages\qtconsole\util.py", line 64, in __new__
    QClass.__init__(inst)
TypeError: __init__() missing 1 required positional argument: 'context'

Versions

* Spyder version: 4.1.5

* Python version: 3.8.8

* Qt version: 5.12.9

* PyQt5 version: 5.12.3

* Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  4.0.0 (OK)
cloudpickle >=0.5.0            :  1.6.0 (OK)
diff_match_patch >=20181111    :  20200713 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.22.0 (OK)
jedi =0.17.1                   :  0.17.1 (OK)
nbconvert >=4.0                :  6.0.7 (OK)
numpydoc >=0.6.0               :  1.1.0 (OK)
paramiko >=2.4.0               :  2.7.2 (OK)
parso =0.7.0                   :  0.7.0 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.8.0 (OK)
pygments >=2.0                 :  2.8.1 (OK)
pylint >=1.0                   :  2.7.2 (OK)
pyls >=0.34.0;<1.0.0           :  0.36.1 (OK)
qdarkstyle >=2.8               :  3.0.2 (OK)
qtawesome >=0.5.7              :  1.0.2 (OK)
qtconsole >=4.6.0              :  5.0.3 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.7 (OK)
sphinx >=0.6.6                 :  3.5.3 (OK)
spyder_kernels >=1.9.4;<1.10.0 :  1.9.4 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  22.0.3 (OK)

# Optional:
cython >=0.21                  :  0.29.22 (OK)
matplotlib >=2.0.0             :  3.4.1 (OK)
numpy >=1.7                    :  1.18.5 (OK)
pandas >=0.13.1                :  1.2.3 (OK)
scipy >=0.17.0                 :  1.6.2 (OK)
sympy >=0.7.3                  :  1.7.1 (OK)

@dalthviz
Copy link
Member

I think this is already resolved in jupyter_client @ccordoba12 ?

@ccordoba12
Copy link
Member

Yes, the solution for now is to install jupyter_client 6.1.12. Higher versions were marked as broken both in PyPI and Conda-forge.

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

No branches or pull requests

4 participants