my_mouse.set_pos silently fails on lab's eye tracking computer
In my task people need to click on one of four images, arranged on the lower half of the screen, to indicate their answer (i.e., 4-AFC test). I added to the trial sequence–prior to the response screen–the following inline script (under 'run'), so the mouse always appears in the middle of the four options rather than on the location of the previous choice which could introduce a response bias.
my_mouse = Mouse() my_mouse.set_pos(pos=(0,300))
On my own Mac this works perfectly, but running the same experiment in the lab, on a Windows computer connected to an Eyelink set up, it silently fails. The mouse cursor is shown on the response display, but always in the location that was clicked on the previous trial. It fails in this same way both when the experiment is actually calling EyeLink as well as in dummy mode.
Indeed, the OS documentation on mouse functions mentions: Warning: set_pos()
is unreliable and will silently fail on some systems. @sebastiaan / @Daniel What is mean by 'some systems' here? And are there any known work-arounds for such systems? I only have lab access again on Monday and have a subject scheduled so am hoping to gather some concrete possible solutions I can then try out. Might it help to change the back-end of my experiment (now legacy)? Is there a different reliable function I could use to get the same outcome of controlling where the mouse cursor will appear?
Thanks,
Louisa
Comments
Hi @LouisaB ,
Might it help to change the back-end of my experiment (now legacy)?
That would indeed be my first suggestion. Unfortunately, there's no guarantee that it will solve the issue, it would be more like trial and error. Perhaps @sebastiaan indeed has a more concrete answer.
Cheers,
Lotje
Did you like my answer? Feel free to
Hi @LouisaB and @lvanderlinden ,
What if you first make the mouse cursor visible, does the position change then?
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Morning @sebastiaan and @lvanderlinden,
Short update: adding the show_cursor line helped only for the first showing of the mouse cursor with the Legacy back-end. However, with Psycho as the back-end both my 2-line script and Sebastiaans 3-line script lead to the intended effect.
Thanks!
Louisa
Thanks for reporting this, @LouisaB
Did you like my answer? Feel free to