The mouse positions of mouse gaze are always zero

Hi,

I used the same code as here:
https://psychopy.org/api/iohub/device/eyetracker_interface/MouseGaze_Implementation_Notes.html
But, I get only “zero” for the positions. I also added a window using the code below:

win = visual.Window(allowGUI=True, monitor=‘testMonitor’, units=‘deg’, screen=1, color=(-0.2, -0.2, -0.2), fullscr=True)

but I am still getting zero positions. I think the window (from visual.Window) or the screen should be defined somewhere in mousegaze functions.
Note, the same code, but for the eyelink eytracker works. Using eyelink I get the eye positions.

I would be thankful for your help.
Mojtaba

I solved my problem. To solve this problem, you need to put “win” as a dictionary into launchHubServer(**ioConfig).

For example:

win = visual.Window(allowGUI=True, monitor=mon, units='pix', screen=screen, color=(-0.2, -0.2, -0.2), fullscr=True, colorSpace='rgb')
ioDevice = 'eyetracker.hw.mouse.EyeTracker'
ioConfig = {ioDevice: {'name': 'tracker', 'device_number': 0}, 'window': win}
io = launchHubServer(**ioConfig)

Also see my another problem which has been solved by this: