[SOLVED] Cannot run Python examples on Windows 10 -> libusb0-dll:err
Posted: Tue Feb 12, 2019 3:25 pm
Hi. I am trying to run the Python examples (i.e. basiclog.py and ramp.py) on Windows 10. Here's my system configuration and what I have installed so far:
1.) Running Windows 10 x64 with Python 2.7.15 installed to C:/Python27
2.) Downloaded the crazyflie-lib-python project from https://github.com/bitcraze/crazyflie-lib-python
3.) Followed the instructions from the README (pip install / pip install -r requirements.txt / etc.)
4.) Installed libusb-win32 (v1.2.6.0) via zadig.exe in Administrator mode
The installation process worked without any errors. I am able to control my CrazyFlies 2.0 with the pre-built PC Client software. So basically everything seems to run fine, except the Python examples.
Here's the error message I get when trying to run examples/basiclog.py for example:
Some ideas what could get me a step further?
1.) Running Windows 10 x64 with Python 2.7.15 installed to C:/Python27
2.) Downloaded the crazyflie-lib-python project from https://github.com/bitcraze/crazyflie-lib-python
3.) Followed the instructions from the README (pip install / pip install -r requirements.txt / etc.)
4.) Installed libusb-win32 (v1.2.6.0) via zadig.exe in Administrator mode
The installation process worked without any errors. I am able to control my CrazyFlies 2.0 with the pre-built PC Client software. So basically everything seems to run fine, except the Python examples.
Here's the error message I get when trying to run examples/basiclog.py for example:
I also tried to switch to libusbK (v3.0.7.0) via zadig.exe. But when doing this, neither the PC Client nor the Python scripts work.E:\Projekte\_Abraham\crazyflie\workspace\crazyflie-lib-python>python examples/basiclog.py
Scanning interfaces for Crazyflies...
Crazyflies found:
radio://0/80/2M
Connecting to radio://0/80/2M
ERROR:cflib.crazyflie:Couldn't load link driver: [Errno None] libusb0-dll:err [set_configuration] could not set config 1: win error: The parameter is incorrect.
Traceback (most recent call last):
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crazyflie\__init__.py", line 223, in open_link
link_uri, self._link_quality_cb, self._link_error_cb)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\__init__.py", line 91, in get_link_driver
instance.connect(uri, link_quality_callback, link_error_callback)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 191, in connect
address)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 101, in __init__
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 70, in __init__
self.radio = Crazyradio(devid=devid)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 126, in __init__
self.dev.set_configuration(1)
File "C:\Python27\lib\site-packages\usb\core.py", line 799, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "C:\Python27\lib\site-packages\usb\core.py", line 128, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 439, in set_configuration
_check(_lib.usb_set_configuration(dev_handle, config_value))
File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 380, in _check
raise USBError(errmsg, ret)
USBError: [Errno None] libusb0-dll:err [set_configuration] could not set config 1: win error: The parameter is incorrect.
Connection to radio://0/80/2M failed: Couldn't load link driver: [Errno None] libusb0-dll:err [set_configuration] could not set config 1: win error: The parameter is incorrect.
Traceback (most recent call last):
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crazyflie\__init__.py", line 223, in open_link
link_uri, self._link_quality_cb, self._link_error_cb)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\__init__.py", line 91, in get_link_driver
instance.connect(uri, link_quality_callback, link_error_callback)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 191, in connect
address)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 101, in __init__
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 70, in __init__
self.radio = Crazyradio(devid=devid)
File "e:\projekte\_abraham\crazyflie\workspace\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 126, in __init__
self.dev.set_configuration(1)
File "C:\Python27\lib\site-packages\usb\core.py", line 799, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "C:\Python27\lib\site-packages\usb\core.py", line 128, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 439, in set_configuration
_check(_lib.usb_set_configuration(dev_handle, config_value))
File "C:\Python27\lib\site-packages\usb\backend\libusb0.py", line 380, in _check
raise USBError(errmsg, ret)
USBError: [Errno None] libusb0-dll:err [set_configuration] could not set config 1: win error: The parameter is incorrect.
Some ideas what could get me a step further?