From: vvyogi . <vv...@gm...> - 2013-10-03 05:22:39
|
Python is not finding the libusb-win32.dll file, you could put it inside the python interpreter directory just for tests The directory *C:\Python27\DLLs* contains* libusb0.dll*, this same file is also there in *C:\Windows\System32* directory. I removed the *dll* from *C:\Python27\DLLs *and I ran my program, it gave the same error log( as if removing the *dll* made no difference). Does this means that pyUsb is using backend from system32(or I am looking at the wrong directory). 2013-10-03 10:32:16,684 INFO:usb.core:find(): using backend >> "usb.backend.libusb10" > > 2013-10-03 10:32:16,684 >> DEBUG:usb.backend.libusb10:_LibUSB.enumerate_devices() > > 2013-10-03 10:32:16,749 >> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device >> object at 0x01841AF0>) > > 2013-10-03 10:32:16,750 >> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device >> object at 0x01841B70>) > > 2013-10-03 10:32:16,750 >> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device >> object at 0x01841B30>) > > 2013-10-03 10:32:16,750 >> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device >> object at 0x01841B90>) > > 2013-10-03 10:32:16,750 >> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device >> object at 0x01841AF0>) > > 2013-10-03 10:32:16,750 >> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device >> object at 0x01841B70>) > > 2013-10-03 10:32:16,750 >> DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libusb10._Device >> object at 0x01841B30>) > > 2013-10-03 10:32:16,752 >> DEBUG:usb.backend.libusb10:_LibUSB.get_configuration_descriptor(<usb.backend.libusb10._Device >> object at 0x01841B30>, 0) > > 2013-10-03 10:32:16,752 >> DEBUG:usb.backend.libusb10:_LibUSB.open_device(<usb.backend.libusb10._Device >> object at 0x01841B30>) > > 2013-10-03 10:32:16,752 >> DEBUG:usb.backend.libusb10:_LibUSB.set_configuration(c_void_p(31461336), 1) > > VUSB_HID Device Found > > 1 > > 255 > > 18 > > Traceback (most recent call last): > > File "myu.py", line 24, in <module> > > dev.set_configuration() > > File "C:\Python27\lib\site-packages\usb\core.py", line 547, in >> set_configuration > > self._ctx.managed_set_configuration(self, configuration) > > File "C:\Python27\lib\site-packages\usb\core.py", line 92, in >> managed_set_configuration > > self.backend.set_configuration(self.handle, cfg.bConfigurationValue) > > File "C:\Python27\lib\site-packages\usb\_debug.py", line 60, in do_trace > > return f(*args, **named_args) > > File "C:\Python27\lib\site-packages\usb\backend\libusb10.py", line 503, >> in set_configuration > > _check(_lib.libusb_set_configuration(dev_handle, config_value)) > > File "C:\Python27\lib\site-packages\usb\backend\libusb10.py", line 403, >> in _check > > raise USBError(_str_error[ret], ret, _libusb_errno[ret]) > > usb.core.USBError: [Errno 2] Entity not found > > 2013-10-03 10:32:16,769 >> DEBUG:usb.backend.libusb10:_LibUSB.close_device(c_void_p(31461336)) > > Now about the libusb-win32.dll, I couldn't locate this dll. In the libusb-win32 distribution there i a *libusb0_x86.dll, *is this the required dll that I need to put in *C:\Python27\DLLs *? Kindly suggest where to look for the dll and where to put it ? Thanks and Regards Vivek On Thu, Oct 3, 2013 at 1:41 AM, Wander Lairson Costa < wan...@gm...> wrote: > 2013/10/2 Vivek Yogi <vv...@gm...>: > > I did installed the pyUsb via the usual python package installation > method i.e. > > > >>python setup.py install > > > > As for the libusb, I didn't install any binary or any python setup for > it. > > > > For the device(a vUsb device) I had to install the driver using the > inf-wizard.exe available with libusb-win32 distribution. > > > > Thats all I did for the python end. > > > > For C# application I had to use reference to libUsbDotNet.dll > > > > Python is not finding the libusb-win32.dll file, you could put it > inside the python interpreter directory just for tests. > > -- > Best Regards, > Wander Lairson Costa > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |