Updating Conditions File for Each Participant

Using code means that Pavlovia doesn’t know it needs to load the resource into memory. You should either add the resource in the Online tab of Experiment Settings or dynamically load it using downloadResources as per my crib sheet.

Thanks so much, that makes sense. I’ve added a code_JS at the beginning of the experiment, and have put this in:
psychoJS.downloadResources([
{ name: (“partz” + expInfo[“participant”] + “.xlsx”), path: (“partz” + expInfo[“participant”] + “.xlsx”) }
]);

However, when I try to run the experiment, it says ‘Reference error: path is not defined’
Do you know why this might be?
One thing I’ve noticed is that in the JS export of the code, it is written as this, i.e. with added square brackets, I’m not sure why:

psychoJS.downloadResources([{[name]: ((“partz” + expInfo[“participant”]) + “.xlsx”), [path]: ((“partz” + expInfo[“participant”]) + “.xlsx”)}])

Alternatively, I could try your other option of adding the resource, but I can’t find the online tab of the Experiment settings?

Thank you so so much for your help!

What version of PsychoPy are you using? I haven’t tested this in 2021.

Are you using dumb quotes or smart ones (as pasted)?

The same thing happens whether I use single or double quotes. But yes I’m using Psychopy 3.0 and Pavlovia 2021.1.1. Which versions do you use? Do you know if there’s a way to use the older versions?

Please could you show a screen shot of your code component.

I’m using 2020.2.10. You should be able to select it as an option in Experiment Settings.

Here’s a screenshot:

And regarding experiment settings, are you referring to the settings tab within ‘View Code’, i.e. as shown in this screenshot:


Thanks

The experiment settings within PsychoPy.

2021.1.1 is quite buggy. I would recommend updating to the latest update or going back to 2020.2.10

Ah ok. Will do, thank you for your help! :slight_smile: