From f09cc73fa9b566e3e2e5f1ebbab2a82f0899d96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Tcho=C5=84?= Date: Thu, 16 Apr 2026 20:00:49 +0200 Subject: [PATCH 1/2] Fix errors at `cam.get_movie` call and iteration --- src/instamatic/camera/camera_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instamatic/camera/camera_client.py b/src/instamatic/camera/camera_client.py index a0591d05..3961e7a0 100644 --- a/src/instamatic/camera/camera_client.py +++ b/src/instamatic/camera/camera_client.py @@ -127,7 +127,7 @@ def _eval_dct(self, dct): with self._eval_lock: self.s.send(dumper(dct)) - acquiring_image = dct['attr_name'] in {'get_image', 'get_movie', '__gen_next__'} + acquiring_image = dct['attr_name'] in {'get_image', '__gen_next__'} if acquiring_image and not self.use_shared_memory: response = self.s.recv(self._imagebufsize) @@ -139,7 +139,7 @@ def _eval_dct(self, dct): else: raise RuntimeError(f'Received empty response when evaluating {dct=}') - if self.use_shared_memory and acquiring_image: + if self.use_shared_memory and acquiring_image and data: data = self.get_data_from_shared_memory(**data) if status == 200: From 6a5a7b9dab55104e8b7470a17559eec2127987d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Tcho=C5=84?= Date: Tue, 21 Apr 2026 15:41:53 +0200 Subject: [PATCH 2/2] When getting data from buffer, copy values instead of taking reference --- src/instamatic/camera/camera_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instamatic/camera/camera_client.py b/src/instamatic/camera/camera_client.py index 3961e7a0..08536fbb 100644 --- a/src/instamatic/camera/camera_client.py +++ b/src/instamatic/camera/camera_client.py @@ -196,7 +196,7 @@ def get_data_from_shared_memory(self, name: str, shape: tuple, dtype: str, **kwa print(f'Retrieve data from buffer `{name}`') buffer = self.buffers[name] - data = buffer[:] + data = buffer[:].copy() return data