psychopy.org | Reference | Downloads | Github

'expInfo' is not defined, stops PsychoPy export to Pavlovia

URL of experiment: RecDep [PsychoPy]

Description of the problem: I have created my task in PsychoPy and this works fine from start to end. In my PsychoPy file, when defining stimulus lists for my loops, I have a piece of code that identifies a participant unique stimulus file (see below):

Screenshot 2020-12-11 at 11.53.14

However when I go link my PsychoPy task with the Pavlovia server, I get the following error message:

As we can see the error appears to centre on the expInfo variable. I have attempted to solve this issue by defining the participant number from the start of the experiment with a participant number (e.g. 100), and this is the only information I link to expInfo in the experiment settings. However this solution does not work.

What is even more confusing is a colleague of mine uses the same code to define participant-unique file identifiers, and they have no problem. So I am at a bit of a loss as to how I can fix this issue!

Thanks in advance and best regards,

Matt

PsychoPy file attached

RecDep.psyexp (91.4 KB) list_1_.csv (10.4 KB)

If you put $fileName in your loop Conditions field and then put fileName='list_'+str(expInfo['participant'])+'_.csv' in a Begin Experiment code component, you should have better luck.

That has worked, thanks so much!