From 259b88d0e3b8bb3977377144bdde333336bbabff Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Fri, 28 Jul 2023 11:16:41 +0100 Subject: [PATCH] skip trials with offending session path / file path --- iblrig/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iblrig/commands.py b/iblrig/commands.py index 77dab3560..1f8767bba 100644 --- a/iblrig/commands.py +++ b/iblrig/commands.py @@ -29,7 +29,8 @@ def transfer_data(): for flag in list(local_subjects_path.rglob('transfer_me.flag')): session_path = flag.parent task_settings = raw_data_loaders.load_settings(session_path, task_collection='raw_task_data_00') - if task_settings['NTRIALS'] < 42: + if task_settings is None or task_settings['NTRIALS'] < 42: + print('Skipping {}'.format(session_path)) continue sc = SessionCopier(session_path, remote_subjects_folder=remote_subjects_path) state = sc.get_state()