Howdy, Stranger!

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

Supported by

Unable to use PsychoPy display with PyGaze-0.6.0 on Windows

I have downloaded both the 0.5.1 and the 0.6.0 versions of PyGaze as portable WinPython environments from the PyGaze website. I am able to use the Pygame display (DISPTYPE = 'pygame') with both of them but I'm only able to use the Psychopy display (DISPTYPE = 'psychopy') with the 0.5.1 version.
When I try to run, for example, the simple_tracker_experiment (adjusted for my display dimensions and in dummy mode) with PyGaze 0.6.0, I get the following traceback (the paths were truncated):

Traceback (most recent call last):
    File "...\", line 17, in <module>
        disp = libscreen.Display()
    File "...\pygaze\", line 45, in __init__
        self.__class__.__init__(self, **args)
    File "...\pygaze\_display\", line 70, in __init__
        screen=self.screennr, units='pix')
    File "...\psychopy\visual\", line 237, in __init__
        self.scrWidthCM = self.monitor.getWidth()
AttributeError: 'NoneType' object has no attribute 'getWidth'

I have tried to find the cause of this behaviour but without success. Any help will be much appreciated.
I would like to be able to use the newer version because I'm working with a Tobii eye-tracker and I would like to take advantage of the new Tobii Pro SDK support.

My thanks in advance!
And my gratitude to Edwin and the contributors for such a useful package!

Best regards,


  • Forgot to mention that the previous traceback is preceded by:

    FreeType import Failed: expected string or Unicode object, NoneType found
    2.8495  WARNING         Creating new monitor...
  • Hi Bruno,

    I never used pygaze directly but only as plugin in Opensesame. There I have run quite a few eyetracking experiments with psychopy as backend. If you want to switch to Opensesame, using pygaze, I could be of bigger help for you.


  • Hi Eduard,
    Thank you for your response!

    I didn't identify the root cause of the problem but I think that I found a solution.
    I updated the PsychoPy version in the portable WinPython-PyGaze-0.6.0 environment (that I downloaded from PyGaze website) from version 1.80.06 to version 1.82.01 (the one that OpenSesame standalone comes with) and now it works.

    I actually have already built my experiment in OpenSesame.
    The thing is that I would like to take advantage of the new Tobii Pro SDK support, recently added to PyGaze.
    Using PyGaze directly, I've been able to use both the old (TRACKERTYPE = 'tobii-legacy') and the new (TRACKERTYPE = 'tobii') Tobii SDKs (up until this problem was solved, only with DISPTYPE = 'pygame').
    To use the new Tobii SDK in OpenSesame, I updated the version of PyGaze in OpenSesame environment to match the latest changes in PyGaze's GitHub repository, installed both the old and the new Tobii SDKs and updated OpenSesame plugins for PyGaze (so that the tobii-legacy option appears in pygaze_init).
    While both the legacy and the new option seem to run in OpenSesame, I'm getting some unexpected behaviour with the new one:
    1. The track status box at the start of the calibration process is much less responsive in OpenSesame than in PyGaze alone and sometimes freezes completely;
    2. The letters and the calibration points cannot be seen if the background colour is set to white; and
    3. The experiment lags for seconds on keyboard responses (with the tobii-legacy support there is no noticeable lag on keyboard responses).
    (Probably I should report these issues on a new discussion or create an issue on the GitHub repository!?)

    Since I'm very pressed for time, I'm rewriting the experiment in PyGaze alone to see if I can use the new Tobii SDK support while bypassing these weird behaviours.

    Do you happen to have any experience using OpenSesame with Tobii eye-trackers?
    If so, what do you use to process the raw data?

    Thank you, Eduard,
    Best regards,

Sign In or Register to comment.