If this template helps then use it. If not then just delete and start from scratch.
OS Windows 10 Pro
PsychoPy version v2022.2.1
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
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'.
This specifically seems to happen when my jitter value is set to 11. It doesn’t cause an error for every jitter value at 11 but it does for some. Previously, I did get this error when I had a jitter value of 15, so I just took out all the 15s and changed the jitter value to another number, but I’m further along and don’t want to change all my spreadsheets again. Further, it seems weird this is happening again and I don’t want my paradigm to randomly crash when running subjects in a couple weeks due to a new jitter value causing problems.
When I go to check out the code and where the error is being caused I see this:
if frameN >= jitter: jtBlank.tStop = t jtBlank.frameNStop = frameN jtBlank.setAutoDraw(False)
What did you try to make it work?:
Based on my googling (link here) it seems that the typeError occurs when a value of “None” occurs. Like when my comparison between frameN and jitter = none. But I’m confused on what that means, is it saying like when frameN ends up equalling the jitter that it causes an error? That would expalin why it only happens sometimes for certain values but it makes me scared that changing all the 11s then wouldn’t really fix the issue.
What specifically went wrong when you tried that?:
Again, I’ve tried to “fix” this before by just changing all the jitter values that were giving an error. I am looking for other fixes unless everyone thinks I should I just change all my 11s now to other numbers again.
Thanks in advance!!