psychopy.org | Reference | Downloads | Github

Pavlovia can't find image files

URL of experiment: https://gitlab.pavlovia.org/emmal/exp2001_1_exponential_growth
https://run.pavlovia.org/emmal/exp2001_1_exponential_growth/html/?__pilotToken=9bf31c7ff062936a96d3c8bd1f8f2ff3&__oauthToken=2aa2001fc4079443ff32359b8edc117f935788f4a31a181e4ad8a7ec6ca11988

Description of the problem: I have tried a variety of pathnames for my image files, both using the local path and github path, and my experiment still says the resource cannot be found. Any help getting the correct pathname for the files would be greatly appreciated.

Please could you show what you’re currently trying? Where are the images? I saw that 25 files downloaded when I clicked the pilot link. Is that them? If so, they must already be in or below html/resources

Yes, those are the images and they are in the html/resources folder on gitlab. However, when I tried that pathname it didn’t seem to work.

const imagePath = 'PsychoPy/stimuliSet/'
yint_4_a_1_b_1_04 = [[imagePath +"yint_-4_a_1_b_1_04increasing.jpg"], [imagePath + "yint_-4_a_1_b_1_04decreasing.jpg"]];
yint_2_a_1_b_1_04 = [[imagePath +"yint_2_a_1_b_1_04increasing.jpg"], [imagePath +"yint_2_a_1_b_1_04decreasing.jpg"]];
yint_8_a_1_b_1_04 = [[imagePath +"yint_8_a_1_b_1_04increasing.jpg"], [imagePath +"yint_8_a_1_b_1_04decreasing.jpg"]];
yint_14_a_1_b_1_04 = [[imagePath +"yint_14_a_1_b_1_04increasing.jpg"], [imagePath +"yint_14_a_1_b_1_04decreasing.jpg"]];
yint_4_a_1_b_1_05 = [[imagePath +"yint_-4_a_1_b_1_05increasing.jpg"], [imagePath +"yint_-4_a_1_b_1_05decreasing.jpg"]];
yint_2_a_1_b_1_05 = [[imagePath +"yint_2_a_1_b_1_05increasing.jpg"], [imagePath +"yint_2_a_1_b_1_05increasing.jpg"]];
yint_8_a_1_b_1_05 = [[imagePath +"yint_8_a_1_b_1_05increasing.jpg"], [imagePath +"yint_8_a_1_b_1_05decreasing.jpg"]];
yint_14_a_1_b_1_05 = [[imagePath +"yint_14_a_1_b_1_05increasing.jpg"], [imagePath +"yint_14_a_1_b_1_05decreasing.jpg"]];
yint_4_a_1_b_1_06 = [[imagePath +"yint_-4_a_1_b_1_06increasing.jpg"], [imagePath +"yint_-4_a_1_b_1_06decreasing.jpg"]];
yint_2_a_1_b_1_06 = [[imagePath +"yint_2_a_1_b_1_06increasing.jpg"], [imagePath +"yint_2_a_1_b_1_06decreasing.jpg"]];
yint_8_a_1_b_1_06 = [[imagePath +"yint_8_a_1_b_1_06increasing.jpg"], [imagePath +"yint_8_a_1_b_1_06decreasing.jpg"]];
yint_14_a_1_b_1_06 = [[imagePath +"yint_14_a_1_b_1_06increasing.jpg"], [imagePath +"yint_14_a_1_b_1_06decreasing.jpg"]];
shuffle(yint_4_a_1_b_1_04);
shuffle(yint_2_a_1_b_1_04);
shuffle(yint_8_a_1_b_1_04);
shuffle(yint_14_a_1_b_1_04);
shuffle(yint_4_a_1_b_1_05);
shuffle(yint_2_a_1_b_1_05);
shuffle(yint_8_a_1_b_1_05);
shuffle(yint_14_a_1_b_1_05);
shuffle(yint_4_a_1_b_1_06);
shuffle(yint_2_a_1_b_1_06);
shuffle(yint_8_a_1_b_1_06);
shuffle(yint_14_a_1_b_1_06);
graphs = [];
for (var Idx = 0, _pj_a = 1; (Idx < _pj_a); Idx += 1) {
    graphs.append(yint_4_a_1_b_1_04[Idx]);
    graphs.append(yint_2_a_1_b_1_04[Idx]);
    graphs.append(yint_8_a_1_b_1_04[Idx]);
    graphs.append(yint_14_a_1_b_1_04[Idx]);
    graphs.append(yint_4_a_1_b_1_05[Idx]);
    graphs.append(yint_2_a_1_b_1_05[Idx]);
    graphs.append(yint_8_a_1_b_1_05[Idx]);
    graphs.append(yint_14_a_1_b_1_05[Idx]);
    graphs.append(yint_4_a_1_b_1_06[Idx]);
    graphs.append(yint_2_a_1_b_1_06[Idx]);
    graphs.append(yint_8_a_1_b_1_06[Idx]);
    graphs.append(yint_14_a_1_b_1_06[Idx]);
}
shuffle(graphs);

Above is the JS code I am using, but in addition to ‘PsychoPy/stimuliSet/’ I have also tried ‘html/resources/’.

What folder are the images in? imagePage should be relative to html/resources/