Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send_command() causes TypeError when used with EyeTribe eyetracker #31

Open
dschreij opened this issue Jan 8, 2015 · 3 comments
Open

Comments

@dschreij
Copy link
Contributor

dschreij commented Jan 8, 2015

When calling the exp.pygaze_eyetracker.send_command() from OpenSesame when the tracker type is EyeTribe, the program quits with the following message:

Error while executing inline script
phase: run
item: stimulus_display
line: 603
exception message: request() takes exactly 4 arguments (2 given)
exception type: TypeError

Traceback (also in debug window):
  File "C:\Users\Daniel\Documents\GitHub\OpenSesame\libopensesame\inline_script.py", line 173, in run
    self.experiment.python_workspace._exec(self.crun)
  File "C:\Users\Daniel\Documents\GitHub\OpenSesame\libopensesame\python_workspace.py", line 111, in _exec
    exec(bytecode, self._globals)
  File "<string>", line 10, in <module>
  File "C:\Python27\lib\site-packages\pygaze\_eyetracker\libeyetribe.py", line 604, in send_command
    self.eyetribe._connection.request(cmd)
TypeError: request() takes exactly 4 arguments (2 given)

OpenSesame 2.9.2
pygaze 0.5.0
pytribe #18f66d8

@esdalmaijer
Copy link
Owner

Hi Daniel,

Thanks for this! What command are you sending?

Cheers,
Edwin

@dschreij
Copy link
Contributor Author

I think this was my bad (but this bug is still valid). I actually wanted to log a message and thus should have used the .log() function, but I think this function would also have crashed when sending a real command (as the argument count seems to mismatch). In short, I was not really trying to send a command ;)

@esdalmaijer
Copy link
Owner

Ah, I see where it went wrong. The send_command passes a tuple/list to request, whereas this expects the unpacked contents. Woops!

Thanks for finding out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants