Skip to content

Commit ddc3cb3

Browse files
authored
Merge pull request #1748 from AllenNeuralDynamics/fix_video_file_not_found
fixes video file not found by checking for directory
2 parents 76f6e7f + 9b09f9a commit ddc3cb3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/foraging_gui/Foraging.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,12 @@ def _check_drop_frames(self, save_tag=1):
10871087
self.to_check_drop_frames = 0
10881088
return
10891089

1090+
if not os.path.is_dir(video_folder):
1091+
self.trigger_length=0
1092+
self.to_check_drop_frames=0
1093+
logging.warning('Hit unexpected edge case, no video folder, but video trigger file exists')
1094+
return
1095+
10901096
# Inspect contents of video_folder to determine structure
10911097
entries = os.listdir(video_folder)
10921098
csv_files = [f for f in entries if f.endswith(".csv")]

0 commit comments

Comments
 (0)