Hi, I’ve been using a javascript chunk to generate a variable file name for each participant (as detailed here An approach to SONA integration and by-participant counterbalancing), and it used to work in previous versions of Psychopy/Pavlovia, but I have recently updated PsychoPy after a hiatus and it no longer works.
Briefly, I’ve included a ‘run at the beginning of the experiment’ javascript code chunk that generates file name and path (myItemList = 'trialOrders/ListNumber' +`${listNumberToRun}` + '.csv';
), so that gives me a variable named “myItemList” that should have a value like trialOrders/ListNumber12.csv. I then enter $myItemList in the Conditions field for my main trials loop in Builder. This used to work perfectly in Pavlovia, but since updating PsychoPy Pavlovia no longer seems to find the file referenced by $myItemList: I get the following error message:
Error
Unfortunately we encountered the following error:
when importing condition: trialOrders/ListNumber12.csv
when getting the value of resource: trialOrders/ListNumber12.csv
unknown resource
Try to run the experiment again. If the error persists, contact the experiment designer.
I have verified that the experiment runs perfectly if I hard-code trialOrders/ListNumber12.csv as the entry in the Conditions field, but for some reason Pavlovia is no longer understanding (parsing? evaluating?) that the value of the variable $myItemList is the path that it should use as the name of the file.
What has changed in the way that the Builder evaluates variable names as entries in fields, and how can get this working again?
Thanks!