My jitter variable reads in as 'None' and causes PsychoPy crash

Windows 10 Pro
PsychoPy v2022.2.1
Hello all,

I have a paradigm coded with the following sequence:

1.fixation cross (duration = 30 frames)
2. fixation Jitter (which has a text component called jtBlank with a duration = $jitter. $jitter is a variable defined on my csv file that is read in at the beginning of the loop, set to every repeat)
3. word (duration = participant response indicating wether they already know or don’t know the word).

My $jitter variable is supposed to last betwee 50-250 ms. I am using frame duration to be more accurate and my screen refresh rate is at 60 hertz. So I have the jitter variable in my spreadsheet as a random number between 3-15.

Before, everything was working great, I was able to run through the paradigm no problem. Recently, I started getting this errror:
if frameN >= jitter: TypeError: '>=' not supported between instances of 'int' and 'NoneType'.

In a previous post I got help from @ajus who suggested I do print($jitter) to see the error. When I did this, None was outputted right before the paradigm crashed and I got the error:

if frameN >= jitter: TypeError: '>=' not supported between instances of 'int' and 'NoneType'.

When I go and look at the code it says the problem starts here:

if frameN >= jitter:
jtBlank.tStop = t
jtBlank.frameNStop = frameN

I am not sure what to do to fix this. It had happened previously, and I just changed the jitter value that was causing a problem, but now it seems to be happening when I have a jitter value of 15, 11, or 5. What’s weird is that I have multiple trials with a jitter value of 11 frames and sometimes a trial will complete without error and another won’t. Can anybody tell me why the if frameN >= jitter causes a None value sometimes?

Please could you upload your spreadsheet?

Yes! it’s attached
A1_visual.xlsx (16.9 KB)

That looks fine, though I sometimes has issues with Excel files where the highlighted cell is in an empty column.

You sent an Excel file but you said CSV in your post. Is this the actual file you’re using?

Can you print another value from the spreadsheet to see if it’s just jitter that’s None and if not identify which row(s) are causing the issue?

Do you have any references to jitter elsewhere? Do you ever try to alter the value?

So when you asked about the file being an excel file instead of a csv, it made me think that maybe that was the problem. I decided to just change it’s format into a csv and I haven’t run into any problems since then.