alisdt / tobii-pro-sdk-opensesame-example

Example of capturing eyetracker output in OpenSesame using the Tobii Pro SDK
GNU General Public License v3.0
1 stars 0 forks source link

opensesame example doen't work #1

Closed martipirru closed 5 years ago

martipirru commented 6 years ago

Hello! Thanks for providing this OpenSesame example with Tobii.

I am quite new to both Opensesame and Tobii. I've installed the software and the tobii-research package in OpenSesame, but now I have a problem in running your script. Every time I run it, this error appears in the debug window:

Starting experiment as ExperimentProcess-2 openexp._canvas.legacy.init_display(): enabling hardware surface openexp._canvas.legacy.init_display(): enabling double buffering openexp._canvas.legacy.init_display(): video mode ok openexp.sampler._legacy.init_sound(): sampling freq = 48000, buffer size = 1024 openexp.sampler._legacy.init_sound(): mixer already initialized, closing experiment.run(): experiment started at Wed Jul 11 15:49:03 2018 experiment.run(): disabling garbage collection experiment.end(): enabling garbage collection

Error while executing inline script

item-stack: experiment[prepare].set_up_eyetracker_output[prepare] exception type: IOError exception message: [Errno 13] Permission denied: u'.\Eyetracker example_99_2018-07-11T15.49.05.csv' item: set_up_eyetracker_output time: Wed Jul 11 15:49:05 2018 phase: prepare

Traceback: File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\inline_script.py", line 77, in prepare self.experiment.python_workspace._exec(self.cprepare) File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\python_workspace.py", line 174, in _exec exec(bytecode, self._globals) Inline script, line 69, in IOError: [Errno 13] Permission denied: u'.\Eyetracker example_99_2018-07-11T15.49.05.csv'

What does it mean? Can you tell me how to solve this iussue?

Thank you in advance!

alisdt commented 5 years ago

Apologies for the slow reply.

Firstly, in the latest version of OpenSesame (3.2) I believe that Tobii support is integrated, so you shouldn't need this example, unless you want to do something fancy like a different calibration routine.

That said, the key line in your error message is:

IOError: [Errno 13] Permission denied: u'.\Eyetracker example_99_2018-07-11T15.49.05.csv'

This means that OpenSesame couldn't write the eyetracking data file to the location that you specified.

In the inline script there is a line

output_location = '.' # just use current directory

You can change this to change where the output will go. For example:

output_location = 'C:\Users\myusername\Desktop'

will put it on your desktop (you have to put your real username instead of "myusername"!)

Hope this helps.