spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.33k stars 1.61k forks source link

Order of username/hostname in connect to kernel dialog is confusing #20457

Open hdnh2006 opened 1 year ago

hdnh2006 commented 1 year ago

Description

What steps will reproduce the problem?

Hi, I am following your documentation (https://docs.spyder-ide.org/current/panes/ipythonconsole.html?highlight=ssh#connect-to-a-remote-kernel) to connect to remote kernel via SSH and I am not able to do it.

I have followed all the steps and the first error it doesn't even tried to connect, the response is immediately.

So, I tried to open a SSH tunnel following this instructions: https://stackoverflow.com/questions/68106564/spyder-connect-to-remote-kernel-via-proxy

It seems it tries to connect, but then it keeps trying to do it.

I use Ubuntu 20:04, so this kind of connections should be easier, is there some extra step I must do it?

Traceback

Exception in callback BaseAsyncIOLoop._handle_events(184, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(184, 1)>
Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/henry/.local/bin/.virtualenvs/spyder/lib/python3.8/site-packages/tornado/platform/asyncio.py", line 206, in _handle_events
    handler_func(fileobj, events)
  File "/home/henry/.local/bin/.virtualenvs/spyder/lib/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 614, in _handle_events
    zmq_events = self.socket.EVENTS
  File "/home/henry/.local/bin/.virtualenvs/spyder/lib/python3.8/site-packages/zmq/sugar/attrsettr.py", line 56, in __getattr__
    return self._get_attr_opt(upper_key, opt)
  File "/home/henry/.local/bin/.virtualenvs/spyder/lib/python3.8/site-packages/zmq/sugar/attrsettr.py", line 68, in _get_attr_opt
    return self.get(opt)
  File "zmq/backend/cython/socket.pyx", line 512, in zmq.backend.cython.socket.Socket.get
  File "zmq/backend/cython/socket.pyx", line 270, in zmq.backend.cython.socket._getsockopt
  File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Socket operation on non-socket

Versions

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.1 (OK)
chardet >=2.0.0               :  5.1.0 (OK)
cloudpickle >=0.5.0           :  2.2.1 (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;<9.0.0       :  8.9.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.2 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.17.3 (OK)
keyring >=17.0.0              :  23.13.1 (OK)
nbconvert >=4.0               :  7.2.9 (OK)
numpydoc >=0.6.0              :  1.5.0 (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.4 (OK)
pygments >=2.0                :  2.14.0 (OK)
pylint >=2.5.0;<3.0           :  2.15.10 (OK)
pylint_venv >=2.1.1           :  2.3.0 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.7.1;<1.8.0          :  1.7.1 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.3 (OK)
qstylizer >=0.2.2             :  0.2.2 (OK)
qtawesome >=1.2.1             :  1.2.2 (OK)
qtconsole >=5.4.0;<5.5.0      :  5.4.0 (OK)
qtpy >=2.1.0                  :  2.3.0 (OK)
rtree >=0.9.7                 :  1.0.1 (OK)
setuptools >=49.6.0           :  65.6.3 (OK)
sphinx >=0.6.6                :  6.1.3 (OK)
spyder_kernels >=2.4.2;<2.5.0 :  2.4.2 (OK)
textdistance >=4.2.0          :  4.5.0 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.2.1 (OK)
xdg >=0.26                    :  0.28 (OK)
zmq >=22.1.0                  :  25.0.0 (OK)

# Optional:
cython >=0.21                 :  0.29.33 (OK)
matplotlib >=3.0.0            :  3.6.3 (OK)
numpy >=1.7                   :  1.24.1 (OK)
pandas >=1.1.1                :  1.5.3 (OK)
scipy >=0.17.0                :  1.10.0 (OK)
sympy >=0.7.3                 :  1.11.1 (OK)

Error

It is impossible to connect

image

hdnh2006 commented 1 year ago

I was putting the opposite way, I mean, user/host. I suggest change them. Usually the user goes first: user@192.168.12.345 image

Thanks

ccordoba12 commented 1 year ago

I was putting the opposite way, I mean, user/host. I suggest change them. Usually the user goes first

Ok, that's a good suggestion. Thanks for bringing it up @hdnh2006!

We'll do the change in Spyder 6, to be released later this year.