| Reference | Downloads | Github

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

URL of experiment:

Description of the problem:
@dvbridges – I suspect this is the same error that I still have with another experiment.
I get the above error and am not sure why. I am not using the cross shape, so what else is going on?

Thanks as always


I have the same problem, could you please advise?

URL of experiment:

Description of the problem:
When I try to pilot or run the experiment (in running status), I got the below error msg:
Failed to load resource: the server responded with a status of 404 ()

I have done 2 things (in 2 commits) since the last time it ran just fine (both when piloting and when running)

  1. I uploaded a bunch of new stimuli in the repo’s sound folder
  2. I changed the index.html for assigning those new stimuli

My guess was that the gitlab repo is too large (1.4 GB), can that be the problem? I tried deleting half of the stimuli (in the same 2 steps as above, deleting and changing the index.html) but I still got the error. Also, the repo’s size hasn’t change although the files are not there anymore.


Why and in what way did you manually edit index.html?

I’d recommend that you revert to a previous version and then try agin by, for example, copying files to the local html/resources folder before syncing.

Thank you!
Sorry I wasn’t clear, the experiment is written in jsPsych, not PsychoPy, that’s why I edit index.html.

After simply deleting the files locally and syncing I also reverted the commit for the stimuli set to be the old, smaller one but the repo is still 1.4 GB, even though the files are not in the repository (nor in my local working directory) so there is something wrong with that that might cause the problem, what do you think? It would be great to avoid redoing the experiment with a new repository.

I’m getting the same error. My experiment has a code component specifying rows corresponding to stimuli in an excel sheet(returns an array with the order in which to play the stimuli). All the resources are in the html file (stimuli and excel files), however pavlovia still seems to have a hard time with the excel file(not the stimuli). This is the latest error I get when trying to run my experiment online:
along with this in the browser console:
image (this last one only appears when I refresh the cache)
I think ‘a’ refers to column a in the excel sheet. In order to debug, I set the ‘selected row’ to 1 so I known the problem isn’t the code component.

This is the error I get when I run it on debug

Ideas on how to solve this would be much appreciated!

Have you checked that your Excel file is in html/resources?

Best wishes,


From what I can see, yes

I just tried and got

Unfortunately we encountered the following error:

  • when getting the value of resource: a
  • unknown resource


What is the resource it is supposed to be loading? “a” doesn’t sound like a valid file name and presumably all of your files are in “Resampled_files”.

If it’s supposed to be a note, that doesn’t work online.

I was getting the same error, but now I played with it a little and I think I know where the problem is but I don’t know how to fix it. I tried the experiment while keeping the selected rows completely blank, followed by 0:5, followed by 1,3,5 and they all worked (I have no clue why simply putting 1 doesn’t work though, maybe because it’s not an array?).
Do you know what type of arguments selected rows takes (or rather the function that imports the excel file, TrialHandler.importConditions(psychoJS.serverManager, ‘Practice_sound_files.xlsx’, ‘0:5’))? It works in psychopy because it’s a psychopy function that accepts list, but I don’t know if it works differently with Javascript. I’m have code that creates a list of the rows to read in order to create my different conditions. I just went through the JS code and corrected some things so that the variable used in selected rows is a list. Here is the code

        // add-on: list(s: string): string[]
        function list(s) {
            // if s is a string, we return a list of its characters
            if (typeof s === 'string')
                return s.split('');
                // otherwise we return s:
                return s;
        function range(start, end) {
            var ans = [];
            for (let i = start; i <= end; i++) {
            return ans;
shuffle = util.shuffle;
bl_inst = "blabla1";
int_inst = "blabla2";

//Assign counterbalance order
sub_num = expInfo.participant;
CB = (sub_num % 4);

//Assign sets of stimuli to conditions(ex. block1 includes stimuli 1 to 14 in excel file)
if (((CB === 1) || (CB === 2))) {
    block1 = list(range(0, 14));
    block2 = list(range(14, 28));
    block3 = list(range(28, 42));
    inter1 = [42, 56, 70];
    inter2 = [43, 57, 71];
    inter3 = [44, 58, 72];
    inter4 = [45, 59, 73];
    inter5 = [46, 60, 74];
    inter6 = [47, 61, 75];
    inter7 = [48, 62, 76];
    inter8 = [49, 63, 77];
    inter9 = [50, 64, 78];
    inter10 = [51, 65, 79];
    inter11 = [52, 66, 80];
    inter12 = [53, 67, 81];
    inter13 = [54, 68, 82];
    inter14 = [55, 69, 83];
} else {
    if (((CB === 3) || (CB === 0))) {
        inter1 = [0, 15, 29];
        inter2 = [1, 16, 30];
        inter3 = [2, 17, 31];
        inter4 = [3, 18, 32];
        inter5 = [4, 19, 33];
        inter6 = [5, 20, 34];
        inter7 = [6, 21, 35];
        inter8 = [7, 22, 36];
        inter9 = [8, 23, 37];
        inter10 = [9, 24, 38];
        inter11 = [10, 25, 39];
        inter12 = [11, 26, 40];
        inter13 = [12, 27, 41];
        inter14 = [13, 28, 42];
        block1 = list(range(42, 56));
        block2 = list(range(56, 70));
        block3 = list(range(70, 84));


bl_list = [block1, block2, block3];
in_list = [inter1, inter2, inter3, inter4, inter5, inter6, inter7, inter8, inter9, inter10, inter11, inter12, inter13, inter14];
bl_range = list(range(0, 3));
in_range = list(range(0, 14));

part1_order = [];
part2_order = [];

//Creates trial order
if (((CB === 1) || (CB === 3))) {
    part1_inst = bl_inst;
    part2_inst = int_inst;
    part1_order = ((bl_list[bl_range[0]] + bl_list[bl_range[1]]) + bl_list[bl_range[2]]);
    for (var lists, _pj_c = 0, _pj_a = in_range, _pj_b = _pj_a.length-1; (_pj_c < _pj_b); _pj_c += 1) {
        lists = _pj_a[_pj_c];
        part2_order = part2_order.concat(in_list[in_range[lists]]);
} else {
    if (((CB === 2) || (CB === 0))) {
        part2_inst = bl_inst;
        part1_inst = int_inst;
        part2_order = ((bl_list[bl_range[0]] + bl_list[bl_range[1]]) + bl_list[bl_range[2]]);
        for (var lists, _pj_c = 0, _pj_a = in_range, _pj_b = _pj_a.length-1; (_pj_c < _pj_b); _pj_c += 1) {
            lists = _pj_a[_pj_c];
            part1_order = part1_order.concat(in_list[in_range[lists]]);

I’m using part1_order and part2_order as variables for selected rows.

This is what I see in the .js script compiled by psychopy

//This works in another part of my experiment (single excel sheet no conditions or other complications)
function Acqui1_trialsLoopBegin(thisScheduler) {
  // set up handler to look after randomisation of conditions etc
  Acqui1_trials = new TrialHandler({
    psychoJS: psychoJS,
    nReps: 1, method: TrialHandler.Method.RANDOM,
    extraInfo: expInfo, originPath: undefined,
    trialList: 'Acquisition1_sound_files.xlsx',
    seed: undefined, name: 'Acqui1_trials'

//This doesn't when I use single digit(1) and variable part1_order(which should be alist)
function part1_loopLoopBegin(thisScheduler) {
  // set up handler to look after randomisation of conditions etc
  part1_loop = new TrialHandler({
    psychoJS: psychoJS,
    nReps: 1, method: TrialHandler.Method.RANDOM,
    extraInfo: expInfo, originPath: undefined,
    trialList: TrialHandler.importConditions(psychoJS.serverManager, 'Practice_sound_files.xlsx', '0:5'),
    seed: undefined, name: 'part1_loop'

If you want a single row from the file then you need to put e.g. 1:2 for row 1.

That works but it’s at temporary solution. The goal was to use selected rows to order my conditions. Documentation fro the import conditions function in psychopy says you can use lists (for example[1,3,5], as arguments . That’s what I tried doing, which works in psychopy but not pavlovia.

Have you tried a list with two elements? A one element list may be interpreted differently.

So instead of having inter1=[42,56,70], it would be inter1=[42:43,56:57,70:71]? I can try

I would try the first one first.

Ok, so I finally got it the experiment to work on pavlovia. The experiment runs smoothly(visually and in terms of order of presentation) but there are instances where we don’t hear the audio clip. When I do inspect, it shows me that some files weren’t dowloaded properly. Ex.
The troubling thing is that this is variable. It’s never the same excerpts nor the same number of excerpts. The only consistent thing about it is that the more you try starting the experiment, the more excerpts are downloaded correctly. I’ve checked again that all the resources are in the html folder, so that’s probably not the problem. I’ve also tried running the experiment in the incognito tab (link to thread with this issue: File_Load_Error). Do you have any others ideas on things I can try to solve this problem?

What was the solution to selected rows?

Here’s a page about the error message you’re seeing (not related to Pavlovia)

and another

It sounds like it’s often related to Chrome and could be cache/secure server or something

This will be disappointing answer, but the solution was not using the selected rows. I retried by generating a list with the name of the stimuli instead and it worked so I think I’m going to stick with that. I thought I would get around the downloading resources problem by using an excel sheet instead of coding it(since my other experiment only uses an excel sheet and works perfectly all the time), but it turns out it’s creating equal if not more problems and this latest problem doesn’t seem to be with the code because it works for some people and not for other(so like you said probably a problem due to Chrome or cache).