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: Operation cannot be accomplished in current state #110

Open
gnthibault opened this issue Jan 31, 2022 · 2 comments
Open

Comments

@gnthibault
Copy link
Contributor

gnthibault commented Jan 31, 2022

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

@gnthibault
Copy link
Contributor Author

@gnthibault
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant