I have created an experiment where blocks appear on the screen and participants respond using the keyboard. I’m using excel sheets and loops to change the visual details of the trials without needing a bunch of separate routines. However, I currently have it set so that participants run through Instructions → Trials → Survey Questions with some nested loops. Then they run through the same routines, with different conditions files in the loops.
The experiment works perfectly the first time. The second time, when it is the same routines but different condition files, it only gets through the first set of instructions and the practice trials. The experiment exits before the survey questions open, and I get an error “Invalid parameter. None is not accepted as value.”
The error code seems to suggest that I am trying to create a button of size “none”, but there is no button in the next routine, and it works fine for the routine in which there is a button. There is nothing in my excel files that is labeled explicitly as “none”. The routines themselves work individually - I have put the routine by itself with a loop defined by an individual file, rather than a conditions file in a nested loop, and it works as intended. Based on my troubleshooting, it seems like issue is arising in the transition from the trials routine to the survey questions routine - maybe in exiting the loop or starting the new one?
I cannot figure out how solve the issue, in part because I can’t figure out exactly what the error is trying to tell me. Below is the actual verbiage of the error, along with screenshots of the routines/flow. Any insight is much appreciated!
Error Code:
File "/Users/cpatton4/Desktop/Research/Difficulty Perception/DiffPerception3_lastrun.py", line 1819, in <module>
run(
File "/Users/cpatton4/Desktop/Research/Difficulty Perception/DiffPerception3_lastrun.py", line 1053, in run
button_off_2.setSize(buttonOffSize)
File "/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/visual/basevisual.py", line 1916, in setSize
setAttribute(self, 'size', val2array(newSize, useNone), log, operation)
File "/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/tools/arraytools.py", line 175, in val2array
raise ValueError('Invalid parameter. None is not accepted as '
ValueError: Invalid parameter. None is not accepted as value.
################ Experiment ended with exit code 1 [pid:39480] #################
1130.8978 EXP
Screenshot of experiment and trial that runs only once:
Example of Excel sheet used to run the loop around the trials: