Howdy, Stranger!

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

Supported by

Eye tracking with TobiiPro Nano: trackerserialnumber error

Hey everyone,

I want to use opensesame and pygaze to run eye-tracking experiments with a TobiiPro Nano eye tracker. I ran into a problem that already has been mentioned in this Thread: Unless I add the inline-script mentioned by Edwin setting the Serial Number of the eye tracker, I get the error that the trackerserialnumber can't be found. (I work with Python 3.8.13 and Opensesame 3.3.13)

I was wondering if anyone has found a solution for this issue that does not include adding inline scrips with individual serial numbers? While this solution works for testing purposes, it is not really practical for a lab with 10 eye trackers (i.e. 10 individual serial numbers).

Any tips and hints are highly appreciated!

All the best

Sophie

Comments

  • Hi Sophie,

    it sounds more like being an issue on the Tobii end. Their SDK should be able to retrieve and use the serial numbers of the tracker. Anyway, I don't think there is a real solution for it available in Opensesame or Pygaze at the moment.

    For your specific situation, you can simplify your life a bit, by coding all serialnumbers in one experiment and let Opensesame try all, until one of them works. Like that, you don't need to have a version for every lab pc. Something like this should do:

    from pygaze import settings
    serialnumbers = [1, 2, 3, 4]
    while True:
        num = serialnumbers.pop()
        # the try code is tried. If it fails, the except part is executed. 
        # if it doesnt fail, it continues with the else statement 
        try: 
            settings.TRACKERSERIALNUMBER = num
            # depending on when the serialnumber problem arises, you need to do more here
            # for example init the eyetracker:
            # exp.pygaze_init()
        except: 
            print('wrong number')
        else:
            print('correct number'
            break
        
    

    Perhaps that helps a bit?

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.