gpt4 book ai didi

python - macOS : Access denied (insufficient permissions) 上的 PyUSB

转载 作者:行者123 更新时间:2023-12-05 07:16:58 25 4
gpt4 key购买 nike

我尝试以 root 身份运行代码,但这没有帮助。我需要原始访问 USB 设备,不是 HID!

Traceback (most recent call last):
File "hiqos.py", line 20, in <module>
alternate_setting = usb.control.get_interface(device,interface_number)
File "/usr/local/lib/python2.7/site-packages/usb/control.py", line 244, in get_interface
data_or_wLength = 1)[0]
File "/usr/local/lib/python2.7/site-packages/usb/core.py", line 1034, in ctrl_transfer
self._ctx.managed_claim_interface(self, interface_number)
File "/usr/local/lib/python2.7/site-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/usb/core.py", line 167, in managed_claim_interface
self.backend.claim_interface(self.handle, i)
File "/usr/local/lib/python2.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/python2.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)

最佳答案

我有同样的错误。我也试过

      sudo kextload -bundle-id com.apple.driver.AppleUSBFTDI

但我的 MacBook 找不到它,尽管它应该适用于 High Sierra。我唯一能做的就是在卸载/dev/disk3 后通过以下方式读取输入:

      sudo diskutil unmountdisk /dev/disk3

然后

      sudo cat /dev/disk3 | hexdump

关于python - macOS : Access denied (insufficient permissions) 上的 PyUSB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58996102/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com