Not sure if this is a bug, or if anybody else has encountered this problem on newer versions of psychopy (i’m on v1.90.dev1)
i’m trying to detect a mouse movement, and if detected update the orientation of a line based on the angle of the cursor from centre (calculating the orientation is simple). In previous versions of psychopy this had worked fine, but for some reason when i initialise a mouse within script (mouse = event.Mouse(win=screen)
) and then later check if the mouse has moved in order to continue with a response using :
if mouse.mouseMoved():
dialup=True
it fails, giving this File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/event.py", line 594, in mouseMoved if self.prevPos[0] != self.lastPos[0]: TypeError: 'NoneType' object has no attribute '__getitem__'
Pretty weird error, is psychopy somehow failing to initialise the mouse as an object earlier on in the script, causing this?
any advice appreciated!