Images not loaded from condition file

Hello, I’m new to using psychopy, and I am having difficulty with creating an experiment using the builder.

I uploaded the condition file in the loop, and I wrote $stim in “image properties”. However, when i run the experiment I get the following error:

"File “C:\Users\martina.montalti\Desktop\gonogo_psychopy\martinaprove.py”, line 1, in
_thisDir = os.path.dirname(os.path.abspath(martinaprove)).decode(sys.getfilesystemencoding())
NameError: name ‘os’ is not defined
################ Experiment ended with exit code 1 [pid:13500] #################
Generating PsychoPy script…

Running: C:\Users\martina.montalti\Desktop\gonogo_psychopy\martinaprove_lastrun.py

2931.8137 INFO Loaded monitor calibration from [‘2023_09_06 16:20’]
using PyQt5
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Hello from the pygame community. Contribute - pygame wiki
32.7085 WARNING User requested fullscreen with size [1024 768], but screen is actually [1920, 1080]. Using actual size
Traceback (most recent call last):
0.0189 DEPRECATION Couldn’t find image C:\Users\martina.montalti\Desktop\gonogo_psychopy\images\FF3_NOMA.bpm; check path? (tried: C:\Users\martina.montalti\Desktop\gonogo_psychopy\images\FF3_NOMA.bpm)
2.0632 WARNING Monitor specification not found. Creating a temporary one…
ioHub Server Process Completed With Code: 0
File “C:\Users\martina.montalti\Desktop\gonogo_psychopy\martinaprove_lastrun.py”, line 556, in
run(
File “C:\Users\martina.montalti\Desktop\gonogo_psychopy\martinaprove_lastrun.py”, line 370, in run
image.setImage(stim)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\image.py”, line 414, 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 389, in image
self.isLumImage = self._createTexture(
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\basevisual.py”, line 1047, in _createTexture
raise IOError(msg % (tex, os.path.abspath(tex)))
OSError: Couldn’t find image C:\Users\martina.montalti\Desktop\gonogo_psychopy\images\FF3_NOMA.bpm; check path? (tried: C:\Users\martina.montalti\Desktop\gonogo_psychopy\images\FF3_NOMA.bpm)
################# Experiment ended with exit code 1 [pid:1536] #################
2979.3811 INFO Loaded monitor calibration from [‘2023_09_06 16:20’]"

Could you help me? Attached screenshot
Thank you in advance.
Best,
MM


Hi

  1. I would recommend that you place your experiment in your documents folder rather than your desktop
  2. Use a relative path in your conditions file ( images/FF1_NOMA.bpm)
  3. Are your images actually .bmp files? I don’t recognise .bpm. Google tells me it’s a Bizagi Process Modeler Document file. The main issue may be that you have .bmp files in your images folder and you have told PsychoPy to look for ,bpm files.

Thank you! It works!