I had this problem too. Your code works well if you "set_configuration" first and only then claim the interface. This is also the order suggested here: http://libusb.sourceforge.net/api-1.0/caveats.html Share Improve this answer Follow answered Dec 20, 2011 at 21:35 Jaap Versteegh 7...
_check(_lib.usb_set_configuration(dev_handle, config_value)) File "C:\projects\pyusb-1.0.0-a0\usb\backend\libusb01.py", line 364, in _check raise USBError(errmsg) USBError: usb_set_configuration: could not set config 1: win error: A device attached to the system is not fun ction...
in <module> dev.set_configuration() File "/home/garfield/.local/lib/python3.9/site-packages/usb/core.py", line 905, in set_configuration self._ctx.managed_set_configuration(self, configuration) File "/home/garfield/.local/lib/python3.9/site-packages/usb/core.py", line 113, in wrapper ret...