Conditional branching and error "int() argument must be a string, a bytes-like object or a number, not 'list'"

Hi everyone.

I’m designing an experiment with a nested loop (practice trials) where the outer loop serves as a dummy loop which iterates the inner loop (nReps equal to 1). The purpose is to repeat the inner loop until a mean accuracy of 85% within an iteration is achieved. All that works fine, the issue isn’t there.

What I want to achieve (and fail to) is skip a whole bunch of following routines whenever the outer loop is iterated 3 times and a mean accuracy of 85% still isn’t achieved. To do that, I wrapped another dummy loop around the routines I want to skip in case the participant still hadn’t achieved a mean acc of 85% after the third repetition of the outer loop. Here’s my code:

Untitled

“practice_trials” here is the inner loop and “acc” is the outer loop. The variable “proceed” is used on nReps in the dummy loop which I want to skip whenever my participant had failed to get through the practice session, regardless of the 3 loop iterations. Here is the error I get whenever I run the experiment and get to the end of the outer loop:

self.nReps = int(nReps)
TypeError: int() argument must be a string, a bytes-like object or a number, not ‘list’

The reason I’ve defined my “proceed” variable in the Begin routine tab is because whenever I don’t, I get an error that “proceed” isn’t defined…that fixes the issue, but now I’m faced with another problem.

I would greatly appreciate if any of you have encountered a similar issue and would like to help a beginner out.

Best regards,
M.

Update: solved the issue myself about half an hour ago. Simply defined “proceed” as “proceed = 0” instead of “proceed = ”. This way the outer loop finished whenever accuracy was greater than 85% and if 85% was never achieved throughout the 3 iterations, skipped the routines after the outer loop.