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

zmq.error.ZMQError: Socket operation on non-socket #20722

Closed
gferradac opened this issue Mar 22, 2023 · 4 comments
Closed

zmq.error.ZMQError: Socket operation on non-socket #20722

gferradac opened this issue Mar 22, 2023 · 4 comments

Comments

@gferradac
Copy link

Description

What steps will reproduce the problem?

zmq.error.ZMQError: Socket operation on non-socket

Traceback

Exception in callback functools.partial(<function ThreadedZMQSocketChannel.send.<locals>.thread_send at 0x7fcccba2fc10>)
Traceback (most recent call last):
  File "/home/gonzalo/.local/lib/python3.9/site-packages/tornado/ioloop.py", line 740, in _run_callback
    ret = callback()
  File "/home/gonzalo/.local/lib/python3.9/site-packages/jupyter_client/threaded.py", line 113, in thread_send
    self.session.send(self.stream, msg)
  File "/home/gonzalo/.local/lib/python3.9/site-packages/jupyter_client/session.py", line 859, in send
    stream.send_multipart(to_send, copy=copy)
  File "/home/gonzalo/.local/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py", line 401, in send_multipart
    self._add_io_state(zmq.POLLOUT)
  File "/home/gonzalo/.local/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py", line 690, in _add_io_state
    self._update_handler(self._state)
  File "/home/gonzalo/.local/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py", line 702, in _update_handler
    if state & self.socket.events:
  File "/home/gonzalo/.local/lib/python3.9/site-packages/zmq/sugar/attrsettr.py", line 56, in __getattr__
    return self._get_attr_opt(upper_key, opt)
  File "/home/gonzalo/.local/lib/python3.9/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

  • Spyder version: 5.4.2 (pip)
  • Python version: 3.9.2 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.9
  • Operating System: Linux 5.10.0-21-amd64

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.1 (OK)
chardet >=2.0.0               :  4.0.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.11.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.0 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  23.13.1 (OK)
nbconvert >=4.0               :  6.5.0 (OK)
numpydoc >=0.6.0              :  1.5.0 (OK)
parso >=0.7.0;<0.9.0          :  0.8.1 (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.14.0 (OK)
pylint >=2.5.0;<3.0           :  2.17.0 (OK)
pylint_venv >=2.1.1           :  3.0.1 (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.3 (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           :  52.0.0 (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.3.1 (OK)
xdg >=0.26                    :  0.27 (OK)
zmq >=22.1.0                  :  25.0.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=3.0.0            :  3.5.2 (OK)
numpy >=1.7                   :  1.22.3 (OK)
pandas >=1.1.1                :  1.4.2 (OK)
scipy >=0.17.0                :  1.8.0 (OK)
sympy >=0.7.3                 :  1.10.1 (OK)
@dalthviz
Copy link
Member

Hi @gferradac thank you for the feedback! This seems like a duplicate of #20381

Could you try to update PyZMQ to the latest release (25.0.2) or downgrade it to 24.0 and check again?

Let us know if the info above helps!

@dalthviz
Copy link
Member

Note: Updating to Spyder 5.4.3 should fix the problem

@dalthviz
Copy link
Member

Closing as a duplicate of #20381

@milindsmart
Copy link

I encounter it still in Spyder v6.

Exception in callback functools.partial(<function ThreadedZMQSocketChannel.send.<locals>.thread_send at 0x7f8a34de16c0>)
Traceback (most recent call last):
  File "/usr/lib64/python3.12/site-packages/tornado/ioloop.py", line 738, in _run_callback
    ret = callback()
          ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jupyter_client/threaded.py", line 113, in thread_send
    self.session.send(self.stream, msg)
  File "/usr/lib/python3.12/site-packages/jupyter_client/session.py", line 859, in send
    stream.send_multipart(to_send, copy=copy)
  File "/usr/lib64/python3.12/site-packages/zmq/eventloop/zmqstream.py", line 401, in send_multipart
    self._add_io_state(zmq.POLLOUT)
  File "/usr/lib64/python3.12/site-packages/zmq/eventloop/zmqstream.py", line 703, in _add_io_state
    self._update_handler(self._state)
  File "/usr/lib64/python3.12/site-packages/zmq/eventloop/zmqstream.py", line 715, in _update_handler
    if state & self.socket.events:
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/zmq/sugar/attrsettr.py", line 55, in __getattr__
    return self._get_attr_opt(upper_key, opt)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/zmq/sugar/attrsettr.py", line 67, 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

  • Spyder version: 6.0.0a5 (pip)
  • Python version: 3.12.3 64-bit
  • Qt version: 5.15.14
  • PyQt5 version: 5.15.10
  • Operating System: Linux-6.9.5-200.fc40.x86_64-x86_64-with-glibc2.39
# Mandatory:
atomicwrites >=1.2.0              :  1.4.1 (OK)
chardet >=2.0.0                   :  5.2.0 (OK)
cloudpickle >=0.5.0               :  3.0.0 (OK)
cookiecutter >=1.6.0              :  2.6.0 (OK)
diff_match_patch >=20181111       :  20230430 (OK)
intervaltree >=3.0.2              :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1  :  8.23.0 (OK)
jedi >=0.17.2,<0.20.0             :  0.19.1 (OK)
jellyfish >=0.7                   :  0.9.0 (OK)
jsonschema >=3.2.0                :  4.19.1 (OK)
keyring >=17.0.0                  :  24.3.1 (OK)
nbconvert >=4.0                   :  7.16.0 (OK)
numpydoc >=0.6.0                  :  1.6.0 (OK)
parso >=0.7.0,<0.9.0              :  0.8.3 (OK)
pexpect >=4.4.0                   :  4.9.0 (OK)
pickleshare >=0.4                 :  0.7.5 (OK)
psutil >=5.3                      :  5.9.8 (OK)
pygments >=2.0                    :  2.17.2 (OK)
pylint >=3.1                      :  3.2.3 (OK)
pylint_venv >=3.0.2               :  3.0.2 (OK)
pyls_spyder >=0.4.0               :  0.4.0 (OK)
pylsp >=1.11.0,<1.12.0            :  1.11.0 (OK)
pylsp_black >=2.0.0,<3.0.0        :  2.0.0 (OK)
pyuca >=1.2                       :  1.2 (OK)
qdarkstyle >=3.2.0,<3.3.0         :  3.2.3 (OK)
qstylizer >=0.2.2                 :  0.2.2 (OK)
qtawesome >=1.3.1,<1.4.0          :  1.3.1 (OK)
qtconsole >=5.5.1,<5.6.0          :  5.5.1 (OK)
qtpy >=2.4.0                      :  2.4.1 (OK)
rtree >=0.9.7                     :  1.2.0 (OK)
setuptools >=49.6.0               :  69.0.3 (OK)
sphinx >=0.6.6                    :  7.2.6 (OK)
spyder_kernels >=3.0.0b5,<3.0.0b6 :  3.0.0b5 (OK)
superqt >=0.6.1,<1.0.0            :  0.6.5 (OK)
textdistance >=4.2.0              :  4.6.2 (OK)
three_merge >=0.1.1               :  0.1.1 (OK)
watchdog >=0.10.3                 :  3.0.0 (OK)
xdg >=0.26                        :  0.27 (OK)
zmq >=24.0.0                      :  25.1.1 (OK)

# Optional:
cython >=0.21                     :  3.0.9 (OK)
matplotlib >=3.0.0                :  3.8.4 (OK)
numpy >=1.7                       :  1.26.4 (OK)
pandas >=1.1.1                    :  2.2.1 (OK)
scipy >=0.17.0                    :  1.11.3 (OK)
sympy >=0.7.3                     :  1.12 (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

3 participants