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
jtBlank.setAutoDraw(False)
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?