Mac OS X 10.9.2 - Psychopy 1.80.01 - can't find image file trying to run program.

415 views
Skip to first unread message

lau fan

unread,
Apr 18, 2014, 2:25:32 AM4/18/14
to psychop...@googlegroups.com
5.9685 ERROR Couldn't find image file '"/Users/Finn/Documents/Psychopy/self made/1.bmp"'; check path?
Traceback (most recent call last):
  File "/Users/Finn/Documents/Psychopy/self made/adaptation_lastrun.py", line 207, in <module>
    image.setImage(c)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/image.py", line 272, in setImage
    maskParams=self.maskParams, forcePOW2=False)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/helpers.py", line 218, in createTexture
    % (tex, os.path.abspath(tex))#ensure we quit
OSError: Couldn't find image file '"/Users/Finn/Documents/Psychopy/self made/1.bmp"'; check path? (tried: /Users/Finn/Documents/Psychopy/self made/"/Users/Finn/Documents/Psychopy/self made/1.bmp")


I'm using the builder view and I used a csv file to indicate the paths of images. When I don't use the csv file  and only type one path in the image stimulus dialog box,the image can be displayed properly. But when I list all paths in a csv file and form a loop of trails, I get the error message above. Note that every single path I typed into the csv file is validate.
I wonder that is the cause of this ?

ShoinExp

unread,
Apr 18, 2014, 10:16:32 AM4/18/14
to psychop...@googlegroups.com
Hi,
    I have no idea what might be going on, but a simple thing to double-check would be the space in your folder name.  I don't believe that spaces in pathnames are a problem for PsychoPy, but I have had problems with spaces in other programming environments, and it's a quick thing to test to see if it's the problem.  Why not try replacing the space with an underscore (so "self_made" instead of "self made") and see if things work.
    Good luck,
    Mark

Jonas Lindeløv

unread,
Apr 18, 2014, 2:24:35 PM4/18/14
to psychop...@googlegroups.com
Also, the last line in the error looks strange:
/Users/Finn/Documents/Psychopy/self made/"/Users/Finn/Documents/Psychopy/self made/1.bmp"

Did you somehow enter it twice somewhere?

Best,
Jonas

Jonathan Peirce

unread,
Apr 19, 2014, 6:22:05 AM4/19/14
to psychop...@googlegroups.com
Ah, yes, you've got quotes in your filenames. Get rid of the quotes when you define the paths to your images

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/41869c60-71ad-403b-89f8-812698d83fab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Jonathan Peirce
Nottingham Visual Neuroscience

http://www.peirce.org.uk/

Jonathan Peirce

unread,
Apr 19, 2014, 6:26:00 AM4/19/14
to psychop...@googlegroups.com
Also, it's a really good idea to give the path to your images in a *relative* way. i.e. specify the path relative to the experiment file, not the entire path. If you move your experiment to a new computer (or folder) all your paths will have to be changed.

Create a file structure like

    /Users/Finn/psychopy/self_made/
        selfmade.psyexp
        stims/
            face1.bmp
            face2.bmp

and then your image paths are just: stims/face1.bmp
It's much neater this way


Jon

On 18/04/2014 19:24, Jonas Lindeløv wrote:
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/41869c60-71ad-403b-89f8-812698d83fab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lau fan

unread,
Apr 19, 2014, 6:43:36 AM4/19/14
to psychop...@googlegroups.com
Thank you so much. It turned out to be a problem with my csv file editor - "RuneCSV". Don't but this app.
And the suggestion you gave is really useful. Relative path makes it easy to share the experiment file.

在 2014年4月19日星期六UTC+8下午6时26分00秒,Jon写道:
Reply all
Reply to author
Forward
0 new messages