From 9b09f9a6dc95997d3774d15aef7b2af0e4f137a1 Mon Sep 17 00:00:00 2001 From: Alex Piet Date: Fri, 12 Jun 2026 09:36:57 -0700 Subject: [PATCH] fixes video file not found by checking for directory --- src/foraging_gui/Foraging.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/foraging_gui/Foraging.py b/src/foraging_gui/Foraging.py index 27f08ebbf..534c1f7db 100644 --- a/src/foraging_gui/Foraging.py +++ b/src/foraging_gui/Foraging.py @@ -1087,6 +1087,12 @@ def _check_drop_frames(self, save_tag=1): self.to_check_drop_frames = 0 return + if not os.path.is_dir(video_folder): + self.trigger_length=0 + self.to_check_drop_frames=0 + logging.warning('Hit unexpected edge case, no video folder, but video trigger file exists') + return + # Inspect contents of video_folder to determine structure entries = os.listdir(video_folder) csv_files = [f for f in entries if f.endswith(".csv")]