Hello
Here are the troubleshooting steps Iāve followed (with lots of help from @djmannion!). Step 3 fixes the duration error issue. Note that itās currently not possible to specify allowed keys in buttonBox properties; if you try to specify keys the button box wonāt work (there might be a solution but I havenāt found one yet).
- Are your pyxid2 and psychopy-cedrus packages updated?
You should have pyxid2 1.0.6 and psychopy-cedrus 0.0.5.
To check/update, navigate to Tools ā Plugin/packages manager ā packages ā open PIP terminal and run:
pip install --upgrade pyxid2
pip install --upgrade psychopy-cedrus
- Have you installed the D2XX Cedrus USB driver?
(More info on the Installing USB Driver for Mac OS X page from Cedrus)
I installed the macOS ARM driver by scrolling down to āMac OS X
10.4 Tiger or laterā on this D2XX page.
Once downloaded, you will need to follow the instructions in the readme.rtf. Make sure you allow Apple security for libftd2xx.1.4.30.dylib (this simply involves opening the .dylib file by right clicking and pressing āopenā instead of double clicking).
- Have you added a custom code component to resolve the āNoneTypeā duration error?
In every routine that involves the button box, add a custom code component. Set the code type to Py, the timing to Begin experiment and add this code:
buttonBox.duration=1
See screenshot:
From what I understand, PsychoPy wants to assign the button box component a duration value, in the same way that an image might have a duration of time it appears on screen. The button box doesnāt really have a duration in that sense, so you end up with an error. This custom code sets the duration to the arbitrary value of 1. Iāve checked (because Iām measuring reaction time) and this doesnāt seem to affect the RT data.
- Fixing ācanāt find Cedrus deviceā error
Finally, if you get an error along the lines of ācanāt find Cedrus deviceā, just unplug and replug the button box.
Hope that helps!