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

Under Mac Access Denied #6

Open
AnnabelleLee1987 opened this issue May 17, 2019 · 4 comments
Open

Under Mac Access Denied #6

AnnabelleLee1987 opened this issue May 17, 2019 · 4 comments

Comments

@AnnabelleLee1987
Copy link
Collaborator

Stacktrace:

python ./led-badge-11x44.py "Hello World"
using [LSicroelectronics LS32 Custm HID] bus=20 dev=3
Traceback (most recent call last):
File "./led-badge-11x44.py", line 374, in
dev.write(1, buf[i64:i64+64])
File "/Users/anna-katharinarausch/dev/led-badge-44x11/girls_env/lib/python3.6/site-packages/usb/core.py", line 940, in write
intf, ep = self._ctx.setup_request(self, endpoint)
File "/Users/anna-katharinarausch/dev/led-badge-44x11/girls_env/lib/python3.6/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/Users/anna-katharinarausch/dev/led-badge-44x11/girls_env/lib/python3.6/site-packages/usb/core.py", line 216, in setup_request
self.managed_claim_interface(device, intf)
File "/Users/anna-katharinarausch/dev/led-badge-44x11/girls_env/lib/python3.6/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/Users/anna-katharinarausch/dev/led-badge-44x11/girls_env/lib/python3.6/site-packages/usb/core.py", line 167, in managed_claim_interface
self.backend.claim_interface(self.handle, i)
File "/Users/anna-katharinarausch/dev/led-badge-44x11/girls_env/lib/python3.6/site-packages/usb/backend/libusb1.py", line 811, in claim_interface
_check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
File "/Users/anna-katharinarausch/dev/led-badge-44x11/girls_env/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

@jnweiger
Copy link
Owner

jnweiger commented May 17, 2019

@AnnabelleLee1987 this should be solved by #4, merged into master. Please test!

@jnweiger
Copy link
Owner

jnweiger commented May 28, 2019

Closing. We assume this case now works well. @AnnabelleLee1987 please reopen if not.

@rkachowski
Copy link

I get the same error on 10.14 macos.

python3 ./led-badge-11x44.py "heellllo weorld"
using [LSicroelectronics LS32 Custm HID] bus=20 dev=9
Type: 11x44
Traceback (most recent call last):
  File "./led-badge-11x44.py", line 498, in <module>
    dev.write(1, buf[i*64:i*64+64])
  File "/usr/local/lib/python3.7/site-packages/usb/core.py", line 940, in write
    intf, ep = self._ctx.setup_request(self, endpoint)
  File "/usr/local/lib/python3.7/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/usb/core.py", line 216, in setup_request
    self.managed_claim_interface(device, intf)
  File "/usr/local/lib/python3.7/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/usb/core.py", line 167, in managed_claim_interface
    self.backend.claim_interface(self.handle, i)
  File "/usr/local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 811, in claim_interface
    _check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
  File "/usr/local/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

@jnweiger
Copy link
Owner

jnweiger commented Aug 21, 2019

Hmm, does it work when you try with sudo or as root user?

Wait, that is odd. that error comes from usb.core -- on mac we should be using pyhidapi instead....

would
pip install pyhidapi
or
brew install hidapi

help?

@jnweiger jnweiger reopened this Aug 21, 2019
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

3 participants