2015-06-13 8:33 GMT-03:00 Matthias Grabowski <em...@mailbox.org>: > hey guys, >
Hi, so what's going on here is a chain of unfortunate events. > i got it now, thanks :) The log follows below, it seems that pyusb was > unable to load the propper backend? when installing i did all the steps > in the documentation: > sudo apt-get install python libusb-1.0-0 > sudo python setup.py install > > Both run fine. > > Heres the Log dump: > 2015-06-12 16:38:05,805 ERROR:usb.backend.libusb1:Error loading libusb > 1.0 backend > Traceback (most recent call last): > File > "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/libusb1.py", > line 880, in get_backend > _setup_prototypes(_lib) > File > "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/libusb1.py", > line 453, in _setup_prototypes > lib.libusb_strerror.argtypes = [c_uint] > File "/usr/lib/python3.2/ctypes/__init__.py", line 366, in __getattr__ > func = self.__getitem__(name) > File "/usr/lib/python3.2/ctypes/__init__.py", line 371, in __getitem__ > func = self._FuncPtr((name_or_ordinal, self)) > AttributeError: /lib/arm-linux-gnueabihf/libusb-1.0.so.0: undefined > symbol: libusb_strerror So, you have a pretty old libusb 1.0 version installed, which does not implement libusb_strerror yet. I solved this issue recently in PyUSB, either upgrading libusb 1.0 or using git version of PyUSB must solve the problem > 2015-06-12 16:38:06,407 ERROR:usb.libloader:'OpenUSB library' could not > be found > 2015-06-12 16:38:06,408 ERROR:usb.backend.openusb:Error loading OpenUSB > backend > 2015-06-12 16:38:06,439 INFO:usb.core:find(): using backend > "usb.backend.libusb0" But you have libusb 0.1 installed, so PyUSB goes for it > 2015-06-12 16:38:06,441 > DEBUG:usb.backend.libusb0:_LibUSB.enumerate_devices() > 2015-06-12 16:38:06,444 > DEBUG:usb.backend.libusb0:_LibUSB.get_device_descriptor(<usb.backend.libusb0._usb_device > object at 0x150dc60>) > 2015-06-12 16:38:06,446 > DEBUG:usb.backend.libusb0:_LibUSB.get_device_descriptor(<usb.backend.libusb0._usb_device > object at 0x151c4e0>) > 2015-06-12 16:38:06,447 > DEBUG:usb.backend.libusb0:_LibUSB.get_configuration_descriptor(<usb.backend.libusb0._usb_device > object at 0x151c4e0>, 0) > 2015-06-12 16:38:06,449 > DEBUG:usb.backend.libusb0:_LibUSB.get_interface_descriptor(<usb.backend.libusb0._usb_device > object at 0x151c4e0>, 0, 0, 0) > 2015-06-12 16:38:06,450 > DEBUG:usb.backend.libusb0:_LibUSB.get_configuration_descriptor(<usb.backend.libusb0._usb_device > object at 0x151c4e0>, 0) > 2015-06-12 16:38:06,452 > DEBUG:usb.backend.libusb0:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb0._usb_device > object at 0x151c4e0>, 1, 0, 0, 0) > 2015-06-12 16:38:06,453 > DEBUG:usb.backend.libusb0:_LibUSB.get_interface_descriptor(<usb.backend.libusb0._usb_device > object at 0x151c4e0>, 0, 0, 0) > 2015-06-12 16:38:06,453 > DEBUG:usb.backend.libusb0:_LibUSB.get_configuration_descriptor(<usb.backend.libusb0._usb_device > object at 0x151c4e0>, 0) > 2015-06-12 16:38:06,455 > DEBUG:usb.backend.libusb0:_LibUSB.open_device(<usb.backend.libusb0._usb_device > object at 0x151c4e0>) > 2015-06-12 16:38:06,514 > DEBUG:usb.backend.libusb0:_LibUSB.close_device(22698048) > > And from the console when i run my script: > Traceback (most recent call last): > File "testusb.py", line 65, in <module> > if dev.is_kernel_driver_active(0): > File > "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/core.py", > line 992, in is_kernel_driver_active > interface) > File > "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/__init__.py", > line 363, in is_kernel_driver_active > _not_implemented(self.is_kernel_driver_active) > File > "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/__init__.py", > line 79, in _not_implemented > raise NotImplementedError(func.__name__) > NotImplementedError: is_kernel_driver_active > But libusb 0.1 does not implement is_kernel_driver_active function... > matt > -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users