if response.keys: # if the list is not empty
border.opacity = 1 # needs to be reset on each trial
if response.keys[0] == ('f'):
border.pos = [-0.3, 0]
elif response.keys[0] == ('j'):
border.pos = [0.3, 0]
else:
border.opacity = 0
else:
continueRoutine = False
- Don’t use ‘break’. Remember this code is embedded amongst lots of other code, so you don’t necessarily know what that will do. Instead, use the recognised way to end a routine:
continueRoutine = False
.
- The NoneType error worries me a bit: hopefully the new first line in the code above might help, otherwise there is some other issue going on.