Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/instamatic/camera/camera_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down
Loading