If this template helps then use it. If not then just delete and start from scratch.
PsychoPy version (e.g. 1.84.x): 3.2.3
What are you trying to achieve?: Defining number of encoding trials
**What did you try to make it work?:
This code used to work, however now I get the following error. I define ‘numEncoding = 25;’ in “begin routine” and I use “numEncoding” as number of repetitions in a loop. I still get this error when I move it to “begin experiment”. I’m working on this as I am modifying an experiment I got to run online before. I’m really not sure what the problem is since I did use this code before and it worked.
Here is the error:
“EncodingTrials = data.TrialHandler(nReps=numEncoding, method=‘random’,
NameError: name ‘numEncoding’ is not defined”.