pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Hello from the pygame community. Contribute - pygame wiki
3.5880 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
Traceback (most recent call last):
File “C:\Users\Ibukun Dada\Downloads\Mini Projects B&B2 Experiment\flanker_experiment_lastrun.py_lastrun.py”, line 342, in
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\image.py”, line 416, in setImage
setAttribute(self, ‘image’, value, log)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\tools\attributetools.py”, line 134, in setAttribute
setattr(self, attrib, value)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\tools\attributetools.py”, line 27, in set
newValue = self.func(obj, value)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\image.py”, line 382, in image
self.isLumImage = self._createTexture(
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\basevisual.py”, line 1022, in _createTexture
raise IOError(msg % (tex, os.path.abspath(tex)))
OSError: Couldn’t find image stimuli/nonfamous_flanker_3.jpg; check path? (tried: C:\Users\Ibukun Dada\Downloads\Mini Projects B&B2 Experiment\stimuli\nonfamous_flanker_3.jpg)
################ Experiment ended with exit code 1 [pid:20744] #################
Hopefully that image shows what the entire folder looks like. But the problem seems to be with my stimuli folder or my images? No matter how I reformat or try to change it it keeps saying that it cannot find the images in the folder even though the images are definitely in the folder. Any help would be really appreciated
could you please show us how you are referencing your image in your file? and show us how your images appear in your stimuli folder? have you tried to select the image directly from the image component in builder - is it the same as how you are referencing it in your spreadsheet?
Yes whenever I select a specific image from the stimuli folder into the image component that always runs and shows on the experiment, but when I try to refrence the conditions folder it always says the images cannot be found even though it finds the correct path each time (so it looks into the stimuli folder and even references the correct image but the OSError still says that image cannot be found). I’ve attatched a picture of how the images are referenced in the file and also a screenshot of how the images look in the stimuli folder. I’ve also got another experiment that is having the exact same problem in terms of the OSError and not finding images. I’d really appreciate any insight on this, thanks so much!
No I haven’t tried that but as you said I really don’t think that would change too much. In the other experiment I mentioned all the images are referenced as a lowercase jpg in both the conditions file and in the stimuli file too so that also shows how that might not make too much of a difference
In this experiment the path is referenced as stimuli/ then any of the images, the stimuli folder is in the exact same file as the Psychopy file. I can upload a compressed folder for the other experiment that I’ve been refrencing so you can test it on your machine. The compressed folder would just need to be decompressed, but it contains the condiitons file, stimuli folder and of course the PsychoPy file. Once again thank you so much for all of the help!
I changed the names and removed the extra .jpg on all of them. However this didn’t seem to change anything. I’ve uploaded a screenshot of the same OSError that it said. I’m beginning to think it could potentially be an issue with PsychoPy since the initial experiment I asked for help with didn’t even have the images tagged with an extra .jpg.
I downloaded your zip, removed the extra file extension and got an error AttributeError: 'str' object has no attribute 'setImage'
This is because you have two variables with the same name: One Variable in your conditions file is called “image” and then you named the image component on the “face” routine “image” as well. As the Variable image from your conditions file is created after the image component image the latter is overwritten and thus does not function as an image component any longer.
Solution: Just rename the image component on the face routine to something unique.
Thank you for pointing this out. However when I changed the image component to $image and even changed the name on the face routine to faces, I still got that same OSError. I’ve uploaded screenshots of all of this. It doesn’t seem to be able to find the stimuli folder anymore since the path doesn’t go towards the stimuli folder anymore. I’m still really unsure about this but I’m genuinely grateful for all of your contributions!
Did you change the stimuli folder/images so it’s not a shortcut anymore?
Because the experiment works fine on my machine.
Can you please share a screenshot of your experiment folder? The path of your experiment and the path of your stimuli folder seems to be different (from the images you have sent).
I don’t think the stimuli folder is a shortcut?? I didn’t change it into a shortcut file. I’ve uploaded a screenshot of the entire experiment folder. If the paths are different do you have any idea of how I might change it from my side so that the experiment works on my computer? Could it potentially be that Psychopy doesn’t work well with my computer then too potentially? Thank you kindly!