From 1c6323b51eca0dbea754ad24f3cc0dfe3d10093b Mon Sep 17 00:00:00 2001 From: x12sa Date: Mon, 18 May 2026 14:31:01 +0200 Subject: [PATCH] ignore zmq preview error --- csaxs_bec/devices/jungfraujoch/jungfraujoch_preview.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/csaxs_bec/devices/jungfraujoch/jungfraujoch_preview.py b/csaxs_bec/devices/jungfraujoch/jungfraujoch_preview.py index 5364c70..713338b 100644 --- a/csaxs_bec/devices/jungfraujoch/jungfraujoch_preview.py +++ b/csaxs_bec/devices/jungfraujoch/jungfraujoch_preview.py @@ -214,11 +214,13 @@ class JungfrauJochPreview: r = self._socket.recv_multipart(flags=zmq.NOBLOCK) self._parse_data(r) except zmq.error.Again: - # No message received, this is expected when the receive queue is empty + # No new message available on Preview socket within timeout that was set pass - except Exception as e: - # Consider moving this to debug level, but it can be useful to see why preview updates are not working - logger.info(f"Error while receiving ZMQ message from JFJ preview at {self.url}: {e}") + except Exception as exc: + logger.info( + f"Error parsing input data from JungfrauJoch host {self.url}. Exception: {exc}" + ) + finally: # Unsubscribe from the topic self._socket.setsockopt(zmq.UNSUBSCRIBE, ZMQ_TOPIC_FILTER)