Description of the problem: Actually I’ve solved the problem, but I wanted to report my solution here in the hope of saving someone else the confusion I experienced.
I created a very basic experiment in PsychoPy builder, and was planning to edit the js code directly to include slightly more complex features (e.g., randomisation of lottery outcomes, conditions, storing and reporting of cumulative lottery winnings across the experiment). However, even the very basic version was giving a “403 forbidden” error when I attempted to pilot it. I had no code components in the experiment in Builder, and I did have an HTML folder with the .js file appearing on Pavlovia (I saw that this was a problem for another user who had received this error previously).
It turned out that the problem was that my first attempt to run the pilot, after initially creating the project, preceded the creation of the HTML folder on Pavlovia (I’m not sure why this was not created during the first sync, but in any case it wasn’t). Subsequently, clicking the “Pilot” button still referred to the failed experiment which had been created at that point, without access to anything in the HTML folder, and so the error persisted. All I had to do was to change the status of the experiment to Inactive, and then back to Piloting, to create a new experiment which was able to access the now-present HTML folder.