psychopy.org | Reference | Downloads | Github

ERROR Couldn't find image

Hello, yesterday my experiment ran fine but today, having not changed it, I received the error below when attempting to run it. I have checked the image path and it is correct. I tried deleting this image from the builder and the same error message then appeared for a different image. I would be very grateful for any advice. Many thanks and best wishes, Kate.

Running: /Users/kate/Desktop/FacesTask/FacesTask_Final_Version_lastrun.py

pyo version 0.8.0 (uses single precision)
10.8600 ERROR Couldn’t find image FacesTask/FaceStimuli/B3PosBW.bmp; check path? (tried: /Users/kate/Desktop/FacesTask/FacesTask/FaceStimuli/B3PosBW.bmp)
2017-05-31 16:27:16.840 python[36394:158862] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/y_/38w1v6dd02sdqjwrd764ycjm0000gn/T/org.psychopy.PsychoPy2.savedState
Traceback (most recent call last):
File “/Users/kate/Desktop/FacesTask/FacesTask_Final_Version_lastrun.py”, line 114, in
texRes=128, interpolate=True, depth=0.0)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/visual/image.py”, line 97, in init
self.setImage(image, log=False)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/visual/image.py”, line 289, in setImage
setAttribute(self, ‘image’, value, log)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/tools/attributetools.py”, line 137, in setAttribute
setattr(self, attrib, value)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/tools/attributetools.py”, line 27, in set
newValue = self.func(obj, value)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/visual/image.py”, line 276, in image
forcePOW2=False)
File “/Applications/PsychoPy2 2.app/Contents/Resources/lib/python2.7/psychopy/visual/basevisual.py”, line 794, in _createTexture
raise IOError, msg % (tex, os.path.abspath(tex))
IOError: Couldn’t find image FacesTask/FaceStimuli/B3PosBW.bmp; check path? (tried: /Users/kate/Desktop/FacesTask/FacesTask/FaceStimuli/B3PosBW.bmp)

That doesn’t seem to be true :wink:

These things are always trickier than they seem. Do you really have a sub-folder called FacesTask within your folder /Users/kate/Desktop/FacesTask/?

Hi Michael,

Thanks for your clue! I had put the experiment in a folder on my desktop, and the stimuli in a subfolder within that. However, now I’ve put the experiment on the desktop and left the rest as it is and it seems to work.

Thanks again!

With best wishes,

Kate

I would have gone the other way and removed the FacesTask/ prefix from the image paths in your conditions file (this would make your experiment more portable and keep everything together within a folder), but whatever works :wink:

Thanks so much Michael. That’s a good option too and cleaner for my desktop!