From 497128e8f25f308ded9156a263b4d2a3002aa1d2 Mon Sep 17 00:00:00 2001 From: Jason Wu <4126566+quatrejuin@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:49:09 -0500 Subject: [PATCH] Fix #420, fix the Node not exsting error for AcquisitionMode AcquisitionMode is recommended but not mandatory. When AcquisitionMode doesn't exist, the genicam/genapi.py:2238 will raise a AttributeError. --- src/harvesters/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harvesters/core.py b/src/harvesters/core.py index a4b3c24..a944a42 100644 --- a/src/harvesters/core.py +++ b/src/harvesters/core.py @@ -2197,7 +2197,7 @@ def start(self, *, run_as_thread: bool = False) -> None: # to acquire in the next session: try: acq_mode = self.remote_device.node_map.AcquisitionMode.value - except GenTL_GenericException as e: + except (GenTL_GenericException, AttributeError) as e: num_images_to_acquire = -1 _logger.warning(e, exc_info=True) else: