psychopy.org | Reference | Downloads | Github

Iolab button box

With PsychoPy 3.2.3 (macOS and Windows).

On https://www.psychopy.org/api/hardware/iolab.html#module-psychopy.hardware.iolab it is written that

The ioLabs library needs to be installed. It is included in the Standalone distributions of PsychoPy as of version 1.62.01.

If I type from psychopy.hardware import iolab in Coder’s shell, I get the error name ‘USBBox’ is not defined, line 41 of iolab.py.

It seems that ioLabs library are not included in the “Standalone” distribution.

I managed to make PyschoPy talk to ioLabs tools from https://github.com/ioLab/python-ioLabs on my mac for tests.

First I applied the Pull request from John Pierce to make the lib Python 3 friendly. Then I made some modifications to discover the button box. So far so good.

But trying to create the USBBox object or opening the device make PyschoPy crashing.

I’m afraid that the ioLabs library is too old (at least on the mac side) and make call to outdated mac os functions.