Skip to content

Commit

Permalink
Fix training phase dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Sep 7, 2023
1 parent d45c697 commit 804cffc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iblrig/base_choice_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,10 +685,12 @@ def __init__(self, training_phase=-1, **kwargs):
try:
training_phase = get_training_phase(self.session_info.SUBJECT_NAME)
self.logger.warning(f"Got training phase: {training_phase}")
except Exception:
except Exception as ex:
self.logger.debug('Failed to get training phase: %s', ex)
if self.interactive:
training_phase = iblrig.graphic.numinput(
"Subject training phase", "Subject trainig phase : (0-5)", nullable=False)
"Subject training phase", "Subject training phase: (0-5)",
askint=True, nullable=False, default=0, minval=0, maxval=5)
else:
self.logger.warning(f"Could not get training phase from Alyx: {traceback.format_exc()}, please set it"
f"manually in ./iblrig_tasks/_iblrig_tasks_trainingChoiceWorld/task.py"
Expand Down

0 comments on commit 804cffc

Please sign in to comment.