Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] psychopy backend using pyglet does not support my_mouse.set_pos

edited September 2015 in OpenSesame

Hi,
I tried examples/teaching about opensesame with touch screen, so far so good. However, I tried to setup a new mouse/touch position with
my_mouse.set_pos(pos=(0,0)) # for example

it comes out the error message...
" File "dist\openexp_mouse\psycho.py", line 56, in set_pos osexception:
Method set_pos not supported in pyglet environment (default for psycho back-end) "

my_mouse.get_pos() works well but not for set_pos method.

Any suggestion will be highly appreciated....

Blessings

Comments

  • edited 12:19PM

    Hi,

    Are you running your experiment on a tablet or a desktop with touch screen? I don't have experience with touch screen computers, but I'm wondering if there is a cursor at all? I would think that any touch screen interface works with touches (equal to mouseclicks) as the only input - meaning that there is nothing for the set_pos command to set. If there is a cursor however, we may need a better technician to enlighten us!

    Cheers,

    Josh

  • edited 12:19PM

    Did someone ask for a technician? I wrote that function ;)

    This is not a problem of your touch screen; it doesn't work with a mouse either. The issue is not with OpenSesame, but with a library that is underlying PsychoPy. Unfortunately, it is exactly as the error message says: pyglet (used by PsychoPy to do stuff with the screen and peripherals) does not allow for setting the mouse position.

    The easy way of getting around the problem, is to switch to a different back-end (legacy and expyriment should work fine).

    The only alternative is to hack your way into pyglet, and finally fix that mouse position functionality. It hasn't worked (i.e. hasn't been there) for years!

  • edited 12:19PM

    Hah alright. Here, have a digital rose, (no romance intended)

  • edited 12:19PM

    Thanks for both with prompt replies......Let me tell you more details and see what you can help....
    First, I used a computer with a touch screen which max resolution is 1024x768. I followed Sebastiaan's teaching example (
    http://www.cogsci.nl/forum/index.php?p=/discussion/21/solved-task-with-touchscreen/p1 ) and met the problem I posted above. What I really want was to detect mouse cursor position (using command: my_mouse.get_pos()) and setup mouse position (using my_mouse.set_pos(pos=(0,0)).

    Then I changed to different back-end. Using Android back-end works perfectly only if I have a higher end touch screen (like in laptop ones supporting at least 1200x960). However, that excellent laptop is not lab's property. I just borrowed for tests only.....

    Next, I changed to legacy and xperyment back-ends. Both had the same problems that the cursor's positions did not match my finger tapping on the screen and the cursor's movement did not follow my finger moving on the screen, looking like hazard and awkward. But the setup cursor position worked.

    So, in a word, every back-end (except Android) has a problem although different when I tried a touch screen. And neither one can be solved by myself....Any assistance and suggestion will be highly appreciated.

    Thanks for your time reading this and Blessings,

Sign In or Register to comment.