| Reference | Downloads | Github

Image path error

If this template helps then use it. If not then just delete and start from scratch.

*PsychoPy version 1.85.4

I am working on an experiment and it keeps producing this error message: IOError: Couldn’t find image FR.png; check path? (tried: C:\Users\cn1992a\AppData\Local\Temp\Temp1_mental_rotation\mental_rotation copy\FR.png).

I have read other forums and am still lost as to how I can edit the path of my image in psychopy. I want the path to look like this C:\Users\cn1992a\Desktop\mental_rotation\mental_rotation copy\F.png)

My overall question is how can I alter the path to an image in psychopy?

  1. Don’t use backslashes \. In most programming languages, they have a special meaning and can create all sorts of mischief. Use / instead: Python will interpret that correctly, regardless of OS.
  2. Use relative paths rather than absolute paths (ones that start at the root level of your disk (i.e. C:)). e.g. images/F.png refers to a file in a folder called images that is in the same folder as your Builder .psyexp experiment file. These paths are much shorter, so there is less to go wrong, and you can move your experiment to a different folder or even a different computer, and everything will still work, as the path is relative to where ever the .psyexp file is.
  3. For some reason you are referring to files being inside a .zip file. Why???
  4. Don’t keep your work on the Desktop. Put it somewhere logical. You’ll thank yourself for it later.