Skip to content

recent versions of msgpack break iohub keyboard.state #3399

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

Closed
isolver opened this issue Jan 11, 2021 · 2 comments
Closed

recent versions of msgpack break iohub keyboard.state #3399

isolver opened this issue Jan 11, 2021 · 2 comments
Assignees
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.

Comments

@isolver
Copy link
Contributor

isolver commented Jan 11, 2021

The demos/coder/iohub/keyboard.py demo does not receive keyboard events - appears to hang until demo timeout occurs. Initial debugging shows that the iohub keyboard.state property is failing on linux. This means demo's / experiments that use keyboard.getEvents() work, but any that use methods like keyboard.getPresses() currently fail on linux.

Env:

  • Mint Linux 18
  • anaconda python 3.6
  • running latest psychopy master source
@isolver
Copy link
Contributor Author

isolver commented Jan 11, 2021

OK, looks like newer versions of msgpack do not support encoding / decoding integer dict keys (see msgpack/msgpack-python#410), which is what is used by the iohub keyboard.state dict. Need to convert int's to str keys for server response.

@isolver isolver changed the title iohub keyboard.py demo not running on linux recent versions of msgpack break iohub keyboard.state Jan 13, 2021
@isolver
Copy link
Contributor Author

isolver commented Jan 13, 2021

Can reproduce on win10 as well when using more recent version of msgpack.

isolver added a commit to isolver/psychopy that referenced this issue Jan 13, 2021
BF: iohub keyboard.state working again. Issue was newer versions of msgpack do not support packing dict objects with int keys. keyboard state now converts dict keys to str on server before sending and then converts back to int on client.
@isolver isolver mentioned this issue Jan 13, 2021
peircej added a commit that referenced this issue Jan 13, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
BF: #3399
@isolver isolver self-assigned this Jan 14, 2021
@isolver isolver added the 🐞 bug Issue describes a bug (crash or error) or undefined behavior. label Jan 14, 2021
@isolver isolver closed this as completed Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.
Projects
None yet
Development

No branches or pull requests

1 participant