psychopy.org | Reference | Downloads | Github

One of the images don't always showin the online experiment

In one block of my experiment, I have to show two images for each trial. But in some trials, only one image shows up. This is not a problem I encountered when running the experiment on my computer. I’ve also pushed the experiment many times just in case if I any the image files isn’t uploaded. Anything I could do with the situation?

Its not really clear what is happening, but can you provide a very minimal example of the error so we can help with debugging?

For some trials of my experiment, I need show two images at the same time. Sometimes, both images show. Sometimes, only one of them show on the screen. (Same setting/codes)

I also need to show 6 images on the same screen at the same time sometimes. But none of them would show on the screen.

The situation I’m describing above only occur when I run the study on Pavlovia/online. When I run it on my local computer, all images show as expected.

I wonder if it has something to do with memory. But each image file is only about 18 kb, so that’s not too big in my opinion.

Any suggestion on what I could do?

Thanks for the extra info. If you could provide a minimal working example, I can have a look at why your images are not always displaying correctly.

I tried to come up with a minimal example for you. But it turns out that the minimal example (with basically same code) does work on my computer and on my Pavlovia. I wonder it’s because my experiment involves nearly 300 images and I include code snippets to randomize those images. These images show up properly when I only have one image for one screen. But when I show 2 images at the same time, sometimes one of them just don’t show up. As I mentioned, I ahve 6 images show at the same time in later trials, and all the 6 images just all don’t show. (My simplified experiment using the same code with only 6 image files work fine).

Has others reported issues about how their experiment don’t work well when it involve many image files? Thanks!

I tried to come up with a minimal example for you. But it turns out that the minimal example (with basically same code) does work on my computer and on my Pavlovia. I wonder it’s because my experiment involves nearly 300 images and I include code snippets to randomize those images. These images show up properly when I only have one image for one screen. But when I show 2 images at the same time, sometimes one of them just don’t show up. As I mentioned, I ahve 6 images show at the same time in later trials, and all the 6 images just all don’t show. (My simplified experiment using the same code with only 6 image files work fine).

Has others reported issues about how their experiment don’t work well when it involve many image files? Thanks!

Ok, well we have not had any reports of this. I think the first thing to do is look at the custom code, and see how things could possibly go wrong. For this, you can use the browsers developer tools for debugging your javascript, set a break point to stop the experiment when things go wrong, and examine the variables which are supposed to be setting the images by using the browser console.

Thanks. I still couldn’t identify any problem with my code. I used the browsers developer tools for debugging and was looking at the console part throughout the experiment.
As I mentioned, in some blocks, I show one image at each trial. In some blocks, I show two images at the same time for each trial. In some other blocks, I show 6 images at the same time for each trial.
The (confusing) problems:

  1. In the block where each trial show two images, although most of the times both images show up, sometimes only one image show. When the image show successfully, the corresponding line in the console shows that there’s a link to the image (src = blob::http://…). But when the image doesn’t show, the line reads: setting the image of ImageStim: imageLeft with argument: undefined. In another word, the image isn’t linked to the file somehow.

  2. In the block where each trial should show 6 images, none of the images show up. Each line corresponding to the image is : WARN setImage visual-3.2.js 119 | setting the image of ImageStim: image5 with argument: undefined.

Again, I’m circulating the images for this experiment. All images needed have been successfully uploaded. This seems a website bug, but I don’t really know.

Thank you so much for keeping up with me!

Thanks. I still couldn’t identify any problem with my code. I used the browsers developer tools for debugging and was looking at the console part throughout the experiment.
As I mentioned, in some blocks, I show one image at each trial. In some blocks, I show two images at the same time for each trial. In some other blocks, I show 6 images at the same time for each trial.
The (confusing) problems:

  1. In the block where each trial show two images, although most of the times both images show up, sometimes only one image show. When the image show successfully, the corresponding line in the console shows that there’s a link to the image (src = blob::http://…). But when the image doesn’t show, the line reads: setting the image of ImageStim: imageLeft with argument: undefined. In another word, the image isn’t linked to the file somehow.
  2. In the block where each trial should show 6 images, none of the images show up. Each line corresponding to the image is : WARN setImage visual-3.2.js 119 | setting the image of ImageStim: image5 with argument: undefined.

Again, I’m circulating the images for this experiment. All images needed have been successfully uploaded. This seems a website bug, but I don’t really know.

Thank you so much for keeping up with me!