AttributeError for conditional result images?

I’ll start by saying I have little experience with psychopy as a psychologist. But, I am trying to get a task from a colleague to work and I have been struggling with a multitude of errors, the most recent one being: AttributeError: Couldn’t make sense of requested image.

This task has the participant collecting berries. Once the berry is presented, they need to repeatedly press the spacebar to collect the berry, so I need the resulting image to either be one of “collected” or “not collected” if they didn’t press the spacebar. My colleague had the same static image as her result image and it would automatically be replaced once the code ran depending on how the participant responded, but for me, it just keeps showing me the same berry being collected (the same static image). I tried to replace the result image with a variable that I defined in the routine but now I get the above mentioned error. I’m not sure what is going on. Should I not be defining a variable for this?

I have tried looking on this forum and on others for solutions but as I am a newbie, I am unsure how to implement them and some have not worked for my issue. I keep getting the same error.

OS (Windows):
PsychoPy version 2025 1.1

I truly appreciate any insight or help on this issue! I have been trying to figure this out for a long time!