# Iolab button box

**URL:** https://discourse.psychopy.org/t/iolab-button-box/10833
**Category:** Coding
**Created:** [February 4, 2020, 11:56am UTC](https://discourse.psychopy.org/t/iolab-button-box/10833 "2020-02-04T11:56:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ypohcysp](https://avatars.discourse-cdn.com/v4/letter/y/4af34b/32.png) [@ypohcysp](https://discourse.psychopy.org/u/ypohcysp)
#### Post date: [February 4, 2020, 11:56am UTC](https://discourse.psychopy.org/t/iolab-button-box/10833/1 "2020-02-04T11:56:50Z")

</div>

With PsychoPy 3.2.3 (macOS and Windows).

On [https://www.psychopy.org/api/hardware/iolab.html#module-psychopy.hardware.iolab](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.

---

<div class="post-metadata">

### Author: ![ypohcysp](https://avatars.discourse-cdn.com/v4/letter/y/4af34b/32.png) [@ypohcysp](https://discourse.psychopy.org/u/ypohcysp)
#### Post date: [February 5, 2020, 10:48am UTC](https://discourse.psychopy.org/t/iolab-button-box/10833/2 "2020-02-05T10:48:02Z")

</div>

I managed to make PyschoPy talk to ioLabs tools from [https://github.com/ioLab/python-ioLabs](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.
