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")]