Description of the problem: By default, all available resources should be download automatically. However, my experiment fails to do so. I would like to know:
What is the code for automatic resource downloading? Is removing code for specifying resources sufficient? My current code is as follows:
How to set the folder for automatically download resources? According to https://pavlovia.org/docs/experiments/resources, all resources are assumed to be local to the index.html file of the experiment. Below is the folder structure of my experiment. My PC did not generate the âresourcesâ sub-directory automatically, so I manually created it and upload the files. Still, my experiments did not load the resources.
Before moving forward, please can I check if you have tried manually adding resources using the online tab in experiment settings? (docs recently updated here as a few people were encountering this question https://www.psychopy.org/online/fromBuilder.html)
I didnât mean by editing the JS script - I meant by using Experiment settings > Online > +/- icon to select resources. Please can you confirm if you have tried that?
I know this is super old, but has anyone figured this out? My resources folder is not downloading automatically and I canât figure out whatâs wrong. When I first synced to Pavlovia, it automatically created the âresourcesâ folder in the html folder, and then I added the files to that resources folder in the next sync. I tried adding them all manually using Experiment settings > Online > +/- icon, as well as with the code found here, but neither worked. This happened to me once before, and I fixed it by making about a million different PsychoPy/Pavlovia experiments, copy/pasting all routines into new PsychoPy experiment files, using different folders, redoing everything many times, and one of the syncs finally downloaded resources as it was supposed to. But that took forever and I had so many different files, so I have no idea what the actual problem was. I really donât want to have to do all of that again, so if anyone knows why this happens, that would be super helpful!
What version of PsychoPy are you using? in general if you are using a more recent release (recommended) we recommend that you leave the âoutputâ path in the Experiment settings > online tab blank (i.e. no need for âhtmlâ) - this is because it avoids duplication of resources and also can avoid these types of resource errors.
Originally I didnât have anything in that box, but when I switched to 2021.2.3, that was another weird thing that started. If I donât put âhtmlâ there, it wonât export the .js and .html files into the html folder (they will instead be put in the same folder as the psychopy experiment) and then it wonât run on Pavlovia. So then I started adding âhtmlâ there and it fixed that problem. Is that why the resources arenât downloading automatically? That might make sense for the new experiments, but that doesnât explain the two experiments that have been working on Pavlovia for months and randomly stopped downloading files automatically two days ago without me touching anything.
P.S. I made this its own thread yesterday with more details, if you want to help me there instead. Thank you!
An experiment that has never been exported to the html folder should be fine. I do still have some experiments running from /html but (as Iâve mentioned elsewhere) recently deleted and recreated one of them to get it working without.