If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Windows 11
PsychoPy version (e.g. 1.84.x): v2024.2.1post4
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
I am making an experiment where music is played during a Flanker task, and after the Flanker task, the user has to answer a questionnaire. Since the experiment consists of 4 sound conditions, I have setup a loop (musicLoop) w/ a conditions file containing the 4 sound files. The questionnaire has 4 parts as well (user will answer one part per loop iteration), so I had tried putting the files into the conditions file as well. I had thought I would be able to put the variable ($questionnaire) as an item for the Form component, but instead I get a NameError (shown in screenshots below). Sorry if itās a odd question, I am very new to PsychoPy - are there different ways to ensure that a different questionnaire file is used per loop iteration?
What did you try to make it work?:
Double checking variable names, renamed parameter in conditions file and attempted initiating variable manually at the start of the experiment, using code component to code form manually
current properties of form component
loop w/ conditions file:
What specifically went wrong when you tried that?:
Include pasted full error message if possible. āThat didnāt workā is not enough information.
NameError: name āquestionnaireā is not defined
################ Experiment ended with exit code 1 [pid:26232] #################