Skip to content

Commit 88fff80

Browse files
authored
Merge pull request #640 from int-brain-lab/dlc_fix_karolina
remove invalid videos from DLC queue
2 parents 6df4879 + 5eb5025 commit 88fff80

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ibllib/pipes/video_tasks.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,14 @@ def _video_intact(file_mp4):
352352
return intact
353353

354354
def _run(self, cams=None, overwrite=False):
355-
# Default to all three cams
356-
cams = cams or self.cameras
357-
cams = assert_valid_label(cams)
355+
# Check that the cams are valid for DLC, remove the ones that aren't
356+
candidate_cams = cams or self.cameras
357+
cams = []
358+
for cam in candidate_cams:
359+
try:
360+
cams.append(assert_valid_label(cam))
361+
except ValueError:
362+
_logger.warning(f'{cam} is not a valid video label, this video will be skipped')
358363
# Set up
359364
self.session_id = self.one.path2eid(self.session_path)
360365
actual_outputs = []

0 commit comments

Comments
 (0)