psychopy.org | Reference | Downloads | Github

Iohub error: Warning: msgpack_numpy could not be imported. This may cause issues for iohub

Hello everyone,

I think I’m launching iohub incorrectly. Maybe you can help me.

OS (e.g. Win10): Win10
PsychoPy version: 3.0.3
Standard Standalone? (y/n) If not then what?:
y

What are you trying to achieve?:

I am trying to use iohub’s ‘keyRelease’ function to record key releases during my experimental . However when I try to import iohub at the beginning of my experiment using code in the code component it just crashes.

What did you try to make it work?:

I have tried to import iohub at the beginning of my experiment and assign the keyboard device to the name ‘keyboard’ (to be called later), using the following code in the code component:

from psychopy.iohub.client import launchHubServer
import random, os
from psychopy import core, sound

io = launchHubServer()
keyboard = io.devices.keyboard

What specifically went wrong when you tried that?:

After running the experiment and entering a participant name, the experiment crashed, and produced the following error message:

“Warning: msgpack_numpy could not be imported. This may cause issues for iohub.”

Would greatly appreciate some help with solving this issue.

I was unable to find a solution per se, but did some rudimentary testing and I found that .iohub was having difficulty working with the Python 3 version of PsychoPy, but works with the Python 2 (PY2) version. At least this is the case on the Windows 10 computers I have tested it on.

Hope this is useful to anyone experiencing similar problems in the future.

Best,
Chris.