Skip to content
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

TypeError under Mac OS #8

Open
st20d opened this issue May 21, 2019 · 2 comments
Open

TypeError under Mac OS #8

st20d opened this issue May 21, 2019 · 2 comments

Comments

@st20d
Copy link

st20d commented May 21, 2019

Hi,

With MacOS I don't get the script running.

First I must additional run
sudo easy_install pip
to get sudo pip install pyhidapi running
and
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null to get sudo brew install hidapi running.

Maybe that's useful for the Help File.

Now the script is running but when I connect a device and try sudo python led-badge-11x44.py "Test" I get follow error code:

using [LSicroelectronics LS32 Custm HID] int=-1 page=1 via pyHIDAPI Traceback (most recent call last): File "led-badge-11x44.py", line 439, in <module> pyhidapi.hid_write(dev, buf[i*64:i*64+64]) File "/Library/Python/2.7/site-packages/pyhidapi/pyhidapi.py", line 638, in hid_write buf[n] = data[n] TypeError: one character string expected

Im Using MacOS Mojave 10.14.4.

@jnweiger
Copy link
Owner

Thanks for the install instructions! Added them to README.md

The type error looks like we broke python2 compatibility. python3 should work better.

@jnweiger
Copy link
Owner

jnweiger commented May 28, 2019

@st20d is python3 an option on MacOS? The combination pyhidapi and python2 does not mix well. I'd avoid finding direct a solution for this, if possible. python3 with pyhidapi works well, and python2 with usb.core also does in the general case. This needs confirmation please what works on MacOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants