PsychoPy Backend IOError loading an image
Hi all,
I am trying to run a program in which a sketchpad item shows a picture for 247 ms. On each trial a different picture is shown, and so an [image] varibale references a loop with the picture file names. The program works perfectly using the Legacy backend, but becuase we want stable and accurate timing, we need to use the PsychoPy backend.
For some reason that I have not been able to figure out, there is an error that stops the program when it tries to prepare some of the images. Here is the text of the error:
- item-stack:
experiment[run].experiment_1[run].PracticePresentation1_250ms_1[run].new_sequence[prepare].Practice_Pics[prepare]
- exception type:
IOError
- exception message:
Found file 'c:\users\resear~1\appdata\local\temp\tmpgplpko.opensesame_pool\truck-cropped.jpg' [= c:\users\resear~1\appdata\local\temp\tmpgplpko.opensesame_pool\truck-cropped.jpg], failed to load as an image
- time:
Wed Oct 16 21:15:09 2019
What is extremely baffling is that some of the pictures load fine, and the program runs smoothly. When I delete these from the loop, some more pictures run smoothly until another that it can't load is reached
All the pictures are coming from the same file location, and I tried starting from scratch and re-adding the all the files to the pool. This did not help, so I do not think the issue is the file path.
Any help that anyone can provide is much appreciated.
Thanks,
Harrison
Comments
Hi,
If you run the loop in order (no randomization), does the loop break always for the same images? And if you remove these images does it work fine then? The error message suggests that it does find the file, but that it is not recognized as an image. Can you open all those images fine? Maybe some files are a bit broken for whatever reason. Resaving them (maybe in a different format) might help.
good luck,
Eduard