TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

I am creating an experiment in the Builder. Part of the experiment involves participants looking at a sinusoidal grating at different orientations and contrast values. I accomplish this using a linked Excel sheet with “GratingOrientation” and “GratingContrast” columns with filled-in predefined values. However, I am getting an error which sometimes crashes my experiment immediately, and sometimes after a few trials. I am getting the following error messages, which I believe have to do with the display:

It seems as if the contrast values are being assigned the type “NoneType” which seems problematic. I have asked for help from various programmers familiar with PsychoPy, and they suspect the error might be due to me running the experiment on a Mac instead of a Windows. I wanted to gain further clarification on these error messages. I am using a Mac and PsychoPy v2022.2.1. Thank you.

To explore this issue further I would try the following things:

  • Assign the orientation a contrast value and only use an excel sheet with contrast values (and the other way around) to make sure that it is only related to the contrast values
  • Use only integer values for the contrast (eg., -1, 0, or 1). This is to check if it is related to how floating point numbers are stored in Excel. Alternatively, you can try to have a single floating point value, e.g.: 0.5
  • Try to save your excel as a csv