European-XFEL / karabo-bridge-py

Tools to allow data exchange with Karabo, in particular streaming of data
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Simulation incompatabiltiy with pyzmq v23.0.0 #64

Closed julianhoersch closed 2 years ago

julianhoersch commented 2 years ago

From pyzmq version 23.0.0 there seems to be an incompatibility with the current implementation of the simulation server and pyzmq. It still works with the previous version 22.3.0. Upon calling the next() method on a karabo-bride client, a zmq error occurs.

Steps to reproduce this behaviour on Maxwell:

now an error is reported:

Traceback (most recent call last): File "\", line 1, in File "/gpfs/exfel/data/scratch/jhoersch/test_pyzmq_env/lib/python3.7/site-packages/karabo_bridge/server.py", line 252, in start_gen sender.loop() File "/gpfs/exfel/data/scratch/jhoersch/test_pyzmq_env/lib/python3.7/site-packages/karabo_bridge/server.py", line 91, in loop done = self.send(data, meta) File "/gpfs/exfel/data/scratch/jhoersch/test_pyzmq_env/lib/python3.7/site-packages/karabo_bridge/server.py", line 64, in send self.server_socket.send_multipart(payload, copy=False) File "/gpfs/exfel/data/scratch/jhoersch/test_pyzmq_env/lib/python3.7/site-packages/zmq/sugar/socket.py", line 670, in send_multipart self.send(msg, zmq.SNDMORE | flags, copy=copy, track=track) File "/gpfs/exfel/data/scratch/jhoersch/test_pyzmq_env/lib/python3.7/site-packages/zmq/sugar/socket.py", line 615, in send return super().send(data, flags=flags, copy=copy, track=track) File "zmq/backend/cython/socket.pyx", line 740, in zmq.backend.cython.socket.Socket.send File "zmq/backend/cython/socket.pyx", line 798, in zmq.backend.cython.socket.Socket.send File "zmq/backend/cython/socket.pyx", line 249, in zmq.backend.cython.socket._send_copy File "zmq/backend/cython/socket.pyx", line 244, 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

tmichela commented 2 years ago

In the lastest pyzmq release constants have been changed to Python enums. I have a fix at #65 Can you check if that solves your issues?

julianhoersch commented 2 years ago

Thanks a lot, yes it fixes the issues! I close this issue now.

tmichela commented 2 years ago

Thanks! I released 0.6.2 with the fix.