Unknown resource for png image

URL of experiment:
sns_warmth_working_memory [PsychoPy]

Description of the problem:
I get this error:
image

I checked the code online:

 buttonNEX = new visual.ImageStim({
    win : psychoJS.window,
    name : 'buttonNEX', units : undefined, 
    image : 'sns\\\\circles\\\\buttonNEXT.png', mask : undefined,
    ori : 0.0, pos : [0.45, (- 0.4)], size : [0.25, 0.08],
    color : new util.Color([1, 1, 1]), opacity : undefined,
    flipHoriz : false, flipVert : false,
    texRes : 128.0, interpolate : true, depth : -2.0 
  });

I tried:
1). Changing the “\\” to “\”, “//”
2). Removing the image online and uploading it again
3. Change from Pilot to Inactive.

I still get the same error message.

Any ideas?

It should be image : ‘sns/circles/buttonNEXT.png’, mask : undefined,

Have you added the image via Experiment Settings / Online (if it’s defined in code)

https://psychopy.org/online/resources.html#handlingonlineresources

This is how it’s defined now in the online code:

  buttonNEX = new visual.ImageStim({
    win : psychoJS.window,
    name : 'buttonNEX', units : undefined, 
    image : 'sns/circles/buttonNEXT.png', mask : undefined,
    ori : 0.0, pos : [0.45, (- 0.4)], size : [0.25, 0.08],
    color : new util.Color([1, 1, 1]), opacity : undefined,
    flipHoriz : false, flipVert : false,
    texRes : 128.0, interpolate : true, depth : -2.0 
  });
  mouse_10 = new core.Mouse({
    win: psychoJS.window,

This is how I uploaded the image:
image

This is how I upload images:
image

What do you mean upload it via experiment settings?
I already tried replacing the image online by deleting the image that was synced with PsychoPy and uploading it again.

Thanks.

@wakecarter , any idea?

I don’t think there’s an advantage of starting at frameN 0 instead of the usual 0 seconds.

I can see the image online so I think it’s fine. However, you could try with a different image just to test. I have found the png files made by GIMP can fail and so I sometimes resave them with IrfanView.

Click on Experiment Settings (the cog icon) in Builder and then on the Online tab and try adding the image file in Additional Resources.

The solution was to put it on “Set every repeat”

image

That suggests that the image wasn’t ready when the experiment started. Were you using a resource manager component?

No, I wasn’t using any resource manager component.

These are the components I use for this routine:

Now I get the error again.
image

The error appears even if it’s set on “Set every repeat”:
image

The image is saved online and I triple-checked everything, as before.

How can I avoid having this error? It is really annoying, as everything seems to be OK with the code.

The image was uploaded to the PsychoPy file after the experiment was initially sync-ed online.
Should I just delete the previous online sync-ed experiment and re-do everything from the beginning?

@wakecarter, any idea?

Thanks.

The \ should get changed to a / online, but it looks like something’s going wrong with that. Try stimulus_list/prac2_letter.png

This is already implemented online, see line 266:

I actually changed it to a .jpg, hoping it would work, but I get the same error.

I also changed the name of the file, re-synced everything and still the same error:
image

Use an incognito tab or Ctrl-Shift-R to clear your cache to see the latest code

https://psychopy.org/online/psychoJSCodingDebugging.html

Tried that too, still same issue. This is extremely annoying.

When you say it’s the same issue, do you mean that your error refers to a ping file when your code refers to a jpg?

It’s the same error regardless of the file type: jpg or png.

I still get this and I tried everything I know: clearing cache, removing image from online and uploading again, changing in PsychoPy from "constant’ to “set every repeat” or “set every frame”.
image

I think that the only solution would be to delete the project and start over.

Have a look on Gitlab to see if your JS files are actually being updated. Maybe you’re getting a sync error which is stopping your changes from being uploaded.