diff --git a/src/openflexure_microscope_server/things/smart_scan.py b/src/openflexure_microscope_server/things/smart_scan.py index 898fbebd..f3331e0d 100644 --- a/src/openflexure_microscope_server/things/smart_scan.py +++ b/src/openflexure_microscope_server/things/smart_scan.py @@ -650,6 +650,8 @@ class SmartScanThing(Thing): in the `images` folder. """ scans: list[ScanInfo] = [] + if not os.path.isdir(self.scans_folder_path): + return scans for f in os.listdir(self.scans_folder_path): path = os.path.join(self.scans_folder_path, f) if os.path.isdir(path):