PsychoPy error message of: Corrupt EXIF data. Expecting to read 4 bytes but only got 0

Hi,

I wonder if you could help me.

I am trying to create a flanker task for a uni project using photos of 3 faces in a row on mac however on some trials the screen goes blank, with no images are displayed, but you can still press 1 or 0 to move on to the next trial.

I have informed my supervisors who are teaching us PsychoPy however they couldn’t fix the error and directed me to yourselves.

When I ran my experiment, the following error message appeared:
" 2023-03-02 17:23:02.855 python [4034:266355] Warning: Expected min height of view: («NSPopoverTouchBar ItemButton: 0x7ff2e8f75e70) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation."

However, when I sent it to my supervisor, they receieved a different error message:
"/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/PIL/TiffImagePlugin.py:792: UserWarning: Corrupt EXIF data. Expecting to read 4 bytes but only got 0.
0.9897 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).
warnings.warn(str(msg))
################ Experiment ended with exit code 0 [pid:44434] ################# "

Any help would be greatly appreciated.

Alessia

The first error seems to be something about it trying to render an image to the MacBook touchbar rather than the screen. Possibly an issue with running an experiment in fullscreen because it treats the touchbar as an extended area of the screen? In any case it will only arise when running on a MacBook with a touchbar, but you may be able to avoid it by not making the window fullscreen.

The second message is probably more relevant to the issue you’re having, because it’s saying that it’s having trouble reading the image files. Based on some googling (look up “corrupt EXIF data python error” and you’ll see a few discussions of this) it’s unlikely that the images are actually corrupt, rather there’s a problem with how this particular Python library reads image files that have EXIF metadata in the first place. The recommendation I see is to remove the EXIF data from the image altogether, and there are websites that can do this (google “remove EXIF data from image”).