Unknown resource error for image

URL of experiment: https://run.pavlovia.org/stella0210/borb/html

Description of the problem:

Hi! I faced a problem when trying to run my experiment online, sorry but this is my first time using pavlovia

I read topics about this issue, but nothing seems to work. I have created the html file and I have checked the resources under the html file, the images and excel file seem fine and complete. However, I keep getting this same error code again and again. The whole experiment runs fine on my laptop, I have no idea what is going on? Is there anything I can do to solve this issue? Really appreciate if anyone can help.

Hello stella_en

there a multiple reasons why Pavolvia does not find 2.png, typo in filename (lower/uppercase), wrong file-extension (PsychoPy makes an educated guess in this case, Pavolvia not), backwards vs forward slashes.

Reference to your repository would help. Currently you link to your experiment where everybody would produce the same error.

Best wishes Jens

hello Jens! Thank you so much for the suggestion. I have solved the unknown resources problem by changing “” to “/”.
However I have encountered another issue here, I realize it does not present the feedback in the online experiment, but it runs fine locally.
So I was thinking it may be my code’s problem, then I set the code from ‘auto → Js’ to ‘both’. and typed the code for JS in “begin routine” manually.

if (keyresp2.corr) {
var msg = Correct! RT = ${keyresp2.rt.toFixed(3)} seconds
} else {
var msg = “Oops! That was wrong”

After changing this, I tried to run the experiment online but it stuck on the initializing experiment page for a very long time.

May I know if you have any suggestions on this?

Best regards

Hello Stella

here some code I use to provide feedback. resp is the name of the keyboard-component to register the reaction.


if resp.corr:
    msg = "correct RT = %.3f" %(resp.rt)
    msgColor = "green"
    msg = "wrong"
    msgColor = "red"

which is ok for offline but does not auto-translate to PsychoJS. So, setting the code-element from auto->JS to Both is correct. However, I format the string as follows.


if (resp.corr) {
    msg = "correct RT =" + resp.rt.toFixed(3) + " sec.";
    msgColor = "green";
} else {
    msg = "wrong";
    msgColor = "red";

Best wishes Jens

Hi Jens,

I’ve solved the issues according to the solution you’ve provided! Thank you so much!

With gratitude,

Hello Stella

do you mind marking it as solution? It facilitates finding it.

Best wishes Jens