I tried to run this price of code to check if usblib1 is getting detected by pyusb:
import osos.environ['PYUSB_DEBUG'] = 'debug'import usb.coreusb.core.find() and this is the output:OSError: [WinError 193] %1 is not a valid Win32 application2016-01-08 19:51:45,676 ERROR:usb.backend.libusb1:Error loading libusb 1.0 backend2016-01-08 19:51:45,679 ERROR:usb.libloader:'OpenUSB library' could not be found2016-01-08 19:51:45,679 ERROR:usb.backend.openusb:Error loading OpenUSB backend2016-01-08 19:51:45,689 INFO:usb.core:find(): using backend "usb.backend.libusb0"2016-01-08 19:51:45,689 DEBUG:usb.backend.libusb0:_LibUSB.enumerate_devices() looks like pyusb dosn't see libusb1 > Date: Fri, 8 Jan 2016 18:07:14 +0100 > From: lists.tor...@gmail.com > To: pyusb-users@lists.sourceforge.net > Subject: Re: [pyusb-users] LibUSB and PyUSB on Windows 10 and python 3.4 > > On Fri, Jan 8, 2016 at 4:38 PM, igor bezenchuk wrote: > > > > Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit > > ( > > D64)] on win32 > > Type "help", "copyright", "credits" or "license" for more information. > >>>> import usb.core > >>>> dev=usb.core.find(find_all=True) > >>>> print(dev) > > <generator object device_iter at 0x00000000030EEE58> > > > > looks like it dosn't return any device found(other than Generator Object, > > which I am not sure what it is exactly) I tried it on more than one machine > > with similar conditions(windows 10 and windows 8.1 both with libusb 1.0.20 > > and pyusb1 and python 3.4. > > find_all=True returns a list of devices (please see e.g. > https://github.com/walac/pyusb/blob/master/docs/tutorial.rst) > > You must iterate through the list: > devices = usb.core.find(find_all=True) > for dev in devices: > print (dev.idProduct, dev.idVendor) > > Probably you want to just find your device, and not all. It is all > explained in the tutorial. > > Tormod > > ------------------------------------------------------------------------------ > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users
------------------------------------------------------------------------------
_______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users