nReps not working

If this template helps then use it. If not then just delete and start from scratch.

PsychoPy version 3.2.4

What are you trying to achieve?:
I am trying to run an experiment with 6 runs, each with 16 trials.
i have a main loop called Runs, which loops thorough a CSV with the 6 run spesific CSV’s



and a nested loop called trails which loops through the 16 trials.

but when i am running the paradigm it keeps going over and over, not breaking after 16.
What am i doing wrong?

Thank you!


The nReps value tells PsychoPy how many times to repeat the conditions file, not how many trials to run. The number of trials is given by the number of rows within the conditions file.

So in this case you just an nReps value of 1 for each loop. That would mean the inner trials loop would run 16 times (once for each of the 16 rows of the conditions file), and the outer loop would run just 6 times (once for each of the 6 rows of that file).

i.e. I think you want 6 × 16 = 96 trials, which is what you would get with nReps values of 1. But at the moment, you will be getting (6 × 6) × (16 × 16) = 9216 trials.

PS: avoid using Windows-style backslashes \ in file paths. They can cause issues in programming languages like Python, where the \ character for historical reasons can be interpreted as other things within a string (e.g. \n would be interpreted as a newline character). You easiest thing to do is just use / separators instead.