Builder Bug: images randomly not loading in loop

OS (e.g. Win10): macOS Sequoia 15.6.1
PsychoPy version (e.g. 2024.2.4 Py 3.8): 2025.1.1
Standard Standalone Installation? yes
Do you want it to also run online? no

I’m experiencing a weird bug where images randomly do not load in my experiment. My experiment was built using Builder mode and is randomized using a loop with a corresponding .xlsx file. The bug appears truly random. There is no consistency in trial index, file path, or file extension affected. I am using no code/extra variables in this experiment. Weirdly enough, the images I’m using work fine in another experiment so I don’t think it’s something to do with a weird encoding format.

I have tried:

  • double checking file paths

  • restarting my computer

  • changing the xlsx into a csv file

  • changing file paths

  • reformatting images

  • changing the version of PsychoPy (I’ve done the last six versions)

  • adding buffer time for the image to load

  • loading the image fresh every frame flip

  • reinitializing the variable just before loading the image

None of those attempts to fix have done anything. I’m truly puzzled on where the bug is coming from, especially given how random it appears to be. The only other clue I have is that I get several “dropped frame” errors but loading the image every frame doesn’t fix the problem so I’m not sure it’s related.

I am going to try running the experiment on a different computer and see if I have the same error. Curious whether anyone has ideas to try next. Happy to provide a zip of the experiment & stimuli if that is helpful.

Is it still random if you change your loop to sequential? The most likely explanation is something like stray spaces or extra rows in your Excel file

Do you have any “Each Frame” code? I think you said no, which would also preclude you having added win.flip()

Copying and pasting the xlsx file into a new one fixed the issue so it must have been extra rows. Very strange though because the number of skips/images not loading was variable on each run.

Thanks for your help!