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

Cannot connect to existing kernel with full path specified #3011

Closed
huyiqun opened this issue Feb 26, 2016 · 2 comments
Closed

Cannot connect to existing kernel with full path specified #3011

huyiqun opened this issue Feb 26, 2016 · 2 comments

Comments

@huyiqun
Copy link

huyiqun commented Feb 26, 2016

Description of your problem

I was using Atom Hydrogen which starts its own ipython kernel inside the editor. In the console, it gives information on how to connect other clients to that kernel
"To connect another client to this kernel, use: --existing /Users/h/.atom/packages/Hydrogen/kernel-configs/kernel-f489dd13-5e0d-4eeb-857d-bad421d7863f.json"

So I copy and paste the full path to spyder's connecting existing kernel dialogue but got

"Unable to connect to IPython kernel-f489dd13-5e0d-4eeb-857d-bad421d7863f.json"

It was running just fine before I deleted the old version of anaconda and reinstall the new one (which now has the folder "anaconda2"). I have tried to launch spyder from anaconda launcher and through terminal, neither worked.

I am not sure if it is Atom/Hydrogen or Spyder that is causing this error. I can connect to the same Hydrogen generated kernel through ipython qtconsole --existing /Users/h/.atom/packages/Hydrogen/kernel-configs/kernel-f489dd13-5e0d-4eeb-857d-bad421d7863f.json which made me believe it was spyder but I was, on the other hand, able to connect spyder to an existing Jupyter notebook kernel by giving the full path of that kernel in the spyder dialogue:
/Users/h/Library/Jupyter/runtime/kernel-7e7152ea-e5cd-4f7c-8a05-265da567afe6.json

Thanks for the help!

Versions and main components

Anaconda2
Python 2.7
Spyder 2.3.8
Mac OS X

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

IPython >=1.0 : 4.0.3 (OK)
matplotlib >=1.0: 1.5.1 (OK)
pandas >=0.13.1 : 0.17.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 3.4.2 (OK)
pyflakes >=0.5.0: 1.0.0 (OK)
pygments >=1.6 : 2.1 (OK)
pylint >=0.25 : None (NOK)
qtconsole >=4.0 : 4.1.1 (OK)
rope >=0.9.2 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.3.5 (OK)
sympy >=0.7.3 : 0.7.6.1 (OK)
zmq >=2.1.11 : 15.2.0 (OK)

@ccordoba12
Copy link
Member

This is going to be fixed by pull request #2878 (hopefully to be merged on Spyder 3.0beta4 :-)

@huyiqun
Copy link
Author

huyiqun commented Sep 28, 2016

@ccordoba12 Sorry to bring this up again but I got the same problem here. Failed to connect to existing kernel after upgrade to spyder 3.0. Everything was working just fine using spyder 2.3.9. Tried both on mac and on windows, got the same result.

Error from internal console:

WARNING:root:kernel died: 3.01099991798
Traceback (most recent call last):
File "C:\Users\y\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyder\plugins\ipythonconsole.py", line 898, in create_client_for_kernel
password)
File "C:\Users\y\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1407, in _create_client_for_kernel
kernel_client.load_connection_file()
File "C:\Users\y\AppData\Local\Continuum\Anaconda2\lib\site-packages\jupyter_client\connect.py", line 417, in load_connection_file
with open(self.connection_file) as f:
IOError: [Errno 22] invalid mode ('r') or filename: u'--existing C:\Users\y\AppData\Roaming\jupyter\runtime\kernel-c7fce3a5-b030-4625-b715-f0935fec6d74.json'

Dependencies:

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.1 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0 : 1.2.3 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.4.1 (OK)
sympy >=0.7.3 : 1.0 (OK)

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

2 participants