int-brain-lab / iblrig

Main repository for IBL rig code
https://int-brain-lab.github.io/iblrig/
MIT License
22 stars 22 forks source link

GUI crashes when selecting a particular animals #607

Closed k1o0 closed 6 months ago

k1o0 commented 9 months ago

Describe the bug

When we try to run a trainingCW session in one of our animals, iblrig (v8.12.11) crashes upon selecting that animal from the dropdown, throwing the following error. This is unique to this mouse (another mouse that was transferred to this rig at the same time didn't have any issues). Any clue what might be going on?

PS C:\Users\IBL> C:\iblrigv8\venv\Scripts\Activate.ps1
(venv) PS C:\Users\IBL> iblrig
C:\iblrigv8\venv\lib\site-packages\one\api.py:155: UserWarning: No cache tables found in C:\Users\IBL\Downloads\ONE\alyx.cortexlab.net
warnings.warn(f'No cache tables found in {self._tables_dir}')
2024-01-24 11:03:17.153 WARNING  [raw_data_loaders.py:  402]   No data loaded: could not find raw settings file
Traceback (most recent call last):
File "C:\iblrigv8\iblrig\gui\wizard.py", line 958, in run
self.result = get_subject_training_info(self.subject_name)
File "C:\iblrigv8\iblrig\choiceworld.py", line 62, in get_subject_training_info
session_info = iterate_previous_sessions(subject_name, task_name=task_name, n=1, **kwargs)
File "C:\iblrigv8\iblrig\path_helper.py", line 36, in iterate_previous_sessions
remote_sessions = _iterate_protocols(rig_paths.remote_subjects_folder.joinpath(subject_name), task_name=task_name, n=n)
File "C:\iblrigv8\iblrig\path_helper.py", line 69, in _iterate_protocols
if task_settings.get('NTRIALS', 43) < 42:  # we consider that under 42 trials it is a dud session
AttributeError: 'NoneType' object has no attribute 'get'