Skip to content

zmq.error.ZMQError: Operation cannot be accomplished in current state #110

Open

Description

@gnthibault

I have this issue randomly thrown at me. I am doing tests on both a x86 machine and a aarch64 raspberry pi, and it seems the issue is almost triggered 100% of the time on the raspberry pi:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/user/test.py", line 125, in apply_rotation
    self.view3D[f"test/test0"].set_transform(
  File "/home/user/venv/lib/python3.8/site-packages/meshcat/visualizer.py", line 152, in set_transform
    return self.window.send(SetTransform(matrix, self.path))
  File "/home/user/venv/lib/python3.8/site-packages/meshcat/visualizer.py", line 58, in send
    self.zmq_socket.send_multipart([
  File "/home/user/venv/lib/python3.8/site-packages/zmq/sugar/socket.py", line 595, in send_multipart
    self.send(msg, SNDMORE | flags, copy=copy, track=track)
  File "/home/user/venv/lib/python3.8/site-packages/zmq/sugar/socket.py", line 547, in send
    return super(Socket, self).send(data, flags=flags, copy=copy, track=track)
  File "zmq/backend/cython/socket.pyx", line 718, in zmq.backend.cython.socket.Socket.send
  File "zmq/backend/cython/socket.pyx", line 765, in zmq.backend.cython.socket.Socket.send
  File "zmq/backend/cython/socket.pyx", line 247, in zmq.backend.cython.socket._send_copy
  File "zmq/backend/cython/socket.pyx", line 242, in zmq.backend.cython.socket._send_copy
  File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Operation cannot be accomplished in current state

The code is not really relevant, as it is sometimes working, sometimes not. The error arise on a SetTransform than is ran on a separate thread from the thread that creates the meshcat.Visualizer()

Sorry for the poor bug reporting, but it is very hard to find a mwe

Activity

  1. gnthibault commented on Jan 8, 2023

    @gnthibault
    ContributorAuthor

    It's sad that this issue prevent from using callback ran in external threads to update the 3d model.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions