I’m currently working on my first project using Pavlovia. I encountered an issue trying to use variable conditions files in one loop depending on a group variable for counterbalancing reasons.
In my first routine in the begin experiment section I am defining the group variable:
group = 0 balance = int(expInfo["participant"]) % 3 if balance == 1: group = 1 elif balance == 2: group = 2 elif balance == 0: group = 3
For the loop mentioned above I put
$"test_trials_cb" + str(group) + ".xlsx"
into the Conditions field so that for each group a different conditions file is used.
Up until now this worked perfectly when uploading to Pavlovia but after my last edit to the conditions files I get the following error message when trying to compile to JS:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 829, in findPathsInFile
filePath = eval(filePath)
File “”, line 1, in
NameError: name ‘group’ is not defined
When I left the Conditions field empty, I could compile to JS again so I restored the conditions file to their previous status but I still got the error message.
Thank you already for any suggestions on how to fix this.