Failed to load resource for audio

URL of experiment:

Description of the problem:

I get Failed to load resource error:the server responded with a status of 404 ()

Not sure what I need to do to fix.

Also get this warning
Tone.min.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.

@Marc_Buehner, are you getting a compile error when you attempt to export the html? It looks like the JS files in your HTML folder do not match your Builder file, suggesting an error occurred when compiling the code. It may be that you are defining your sound stimulus in a code component, and providing the path to the sound files manually, rather than using a sound component. If this is the case, Builder cannot automatically find the resources and move them to the HTML folder. However, you can manually copy them to the HTML > resources folder if they are not there, then sync with Pavlovia to push them up to the online repository.

Btw, the next version of PsychoPy will make it more clear where your errors are occurring in your code by reporting them in the output window.

@dvbridges No I didn’t get compile errors. However, there was a sound file which was defined in a code component. I have moved this into the HTML folder and re-synched but that made no difference.
I then changed the Builder file to replace the definition of the sound event so that it no longer needed to draw on the code, but still the experiment gets stuck on initialising…

@Marc_Buehner, if I compile your experiment using 3.1.5, I get an error because the “cross” shape is not available in 3.1.5. This explains why your HTML and JS files are not updating correctly, e.g., if you look in your HMTL folder, you will see the JS filenames do not match your Builder file names. I would compile the script in a later version of PsychoPy (version >=3.2) using Experiment Settings , and when the next version appears in the next week or so (2020.1), I would update, because there are lots of new fixes and features in the latest versions.

@dvbridges can you please explain what you mean? I don’t follow. So in Builder 3.1.5 I do have the cross shape and it works fine. You mean that 3.1.5 JS does not have the cross?
But when I selected a higher version int he experiment settings then it does not seem to update the html at all – nothing happens when I click the button…
And the earlier errors that I had suggested that the problem was to do with sound files.
Sorry, I am just confused…

Well, this is still failing for me even in 3.2.4 - to get the code to compile using cross shapes, you will need the next imminent release (version 2020). Alternatively, in place of the shape cross, you can use and image stim with a cross.png file, or use a text component using the character ‘+’.

@dvbridges thanks for looking into this for me.
So I removed the cross shape and replaced with a text stimulus ‘+’
I also removed the sound files. But it is still stuck on initialising the experiment. and I still get the same error message " Failed to load resource: the server responded with a status of 404 () "

Its the same sort of reason, your HTML is not compiled correctly - the errors I see show you are also using star shapes, which are also not available until the next release. Btw, error messages are more visible in the next 2020 release.

OK, so I got rid of the star and also the triangle and replaced them with polygons, but still the same error. So what else is going on? Thanks, as always!

Hi, I am also receiving a “Failed to load resource: the server responded with a status of 404 ()” for my experiment

I checked in the Network tab in my browser and it looked like all the audio files are there, but instead of hearing the audio, I just get a single beep at the beginning of each trial. The audio files are in mp3 format, each one is about 28-32 seconds in length with 64 files in total. I have also tried .wav but had the exact same result with mp3.