From 40c1d5ff099f06d751f6f0c72214470cbba9ca82 Mon Sep 17 00:00:00 2001 From: Jacopo Abramo Date: Thu, 19 Oct 2023 15:28:21 +0200 Subject: [PATCH] Closing dataset on `__exit__` --- pycromanager/acquisition/acquisition_superclass.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pycromanager/acquisition/acquisition_superclass.py b/pycromanager/acquisition/acquisition_superclass.py index c6a0b670..720c08e5 100644 --- a/pycromanager/acquisition/acquisition_superclass.py +++ b/pycromanager/acquisition/acquisition_superclass.py @@ -271,6 +271,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): self.mark_finished() # now wait on it to finish self.await_completion() + self.get_dataset().close() def _validate_acq_events(events: dict or list):