"NO CRAZYFLIES FOUND, CANNOT RUN EXAMPLE" via basiclogSync.py

Discussions about all things Bitcraze
Post Reply
jaymc
Beginner
Posts: 4
Joined: Mon Jun 04, 2018 8:53 pm

"NO CRAZYFLIES FOUND, CANNOT RUN EXAMPLE" via basiclogSync.py

Post by jaymc » Wed Jun 13, 2018 2:41 pm

Hello,
I am having an issue getting the crazyflie radio PA to recognize the crazyflie through the pyCharm terminal. I was trying to run the basiclogSync.py file from the crazyflie-lib-python git repo, but the error, which is shown as my 'first error', keeps occurring. I then ran it through flowSequenceSync.py and I got the 'second error' saying that a crazyradio dongle cannot be found. I am using 3.6.5 python and my crazyradio PA was already converted to libusbK beforehand.

Oh and oddly enough, the windows cfclient application was able to find the dongle, but not the code from pyCharm...

________________________________________________________________________________________________________________________________

FIRST ERROR:
C:\Users\jaymc\AppData\Local\Temp\basiclogSync.py\venv\Scripts\python.exe D:/Programs/Git/crazyflie-lib-python/examples/basiclogSync.py
Scanning interfaces for Crazyflies...
Crazyflies found:
No Crazyflies found, cannot run example

________________________________________________________________________________________________________________________________

SECOND ERROR:
Connecting to radio://0/80/250K
ERROR:cflib.crazyflie:Couldn't load link driver: Cannot find a Crazyradio Dongle
Connection to radio://0/80/250K failed: Couldn't load link driver: Cannot find a Crazyradio Dongle


Traceback (most recent call last):
Traceback (most recent call last):
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 119, in __init__
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 119, in __init__
device = _find_devices()[devid]
device = _find_devices()[devid]
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 81, in _find_devices
busses = usb.busses()
AttributeError: module 'usb' has no attribute 'busses'
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 81, in _find_devices

busses = usb.busses()
During handling of the above exception, another exception occurred:

AttributeError: module 'usb' has no attribute 'busses'
Traceback (most recent call last):
File "D:\Programs\Git\crazyflie-lib-python\cflib\crazyflie\__init__.py", line 218, in open_link
link_uri, self._link_quality_cb, self._link_error_cb)

File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\__init__.py", line 91, in get_link_driver
During handling of the above exception, another exception occurred:
instance.connect(uri, link_quality_callback, link_error_callback)

Traceback (most recent call last):
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 191, in connect
address)
File "D:\Programs\Git\crazyflie-lib-python\cflib\crazyflie\__init__.py", line 218, in open_link
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 101, in __init__
link_uri, self._link_quality_cb, self._link_error_cb)
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\__init__.py", line 91, in get_link_driver
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 70, in __init__
self.radio = Crazyradio(devid=devid)
instance.connect(uri, link_quality_callback, link_error_callback)
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 121, in __init__
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 191, in connect
raise Exception('Cannot find a Crazyradio Dongle')
address)
Exception: Cannot find a Crazyradio Dongle

File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 101, in __init__
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 70, in __init__
self.radio = Crazyradio(devid=devid)
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 121, in __init__
raise Exception('Cannot find a Crazyradio Dongle')
Exception: Cannot find a Crazyradio Dongle

Traceback (most recent call last):
File "D:/Programs/Git/crazyflie-lib-python/examples/flowsequenceSync.py", line 50, in <module>
with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
File "D:\Programs\Git\crazyflie-lib-python\cflib\crazyflie\syncCrazyflie.py", line 68, in __enter__
self.open_link()
File "D:\Programs\Git\crazyflie-lib-python\cflib\crazyflie\syncCrazyflie.py", line 65, in open_link
raise Exception(self._error_message)
Exception: Couldn't load link driver: Cannot find a Crazyradio Dongle

Traceback (most recent call last):
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 119, in __init__
device = _find_devices()[devid]
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 81, in _find_devices
busses = usb.busses()
AttributeError: module 'usb' has no attribute 'busses'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Programs\Git\crazyflie-lib-python\cflib\crazyflie\__init__.py", line 218, in open_link
link_uri, self._link_quality_cb, self._link_error_cb)
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\__init__.py", line 91, in get_link_driver
instance.connect(uri, link_quality_callback, link_error_callback)
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 191, in connect
address)
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 101, in __init__
_RadioManager._radios[self._devid] = _SharedRadio(self._devid)
File "D:\Programs\Git\crazyflie-lib-python\cflib\crtp\radiodriver.py", line 70, in __init__
self.radio = Crazyradio(devid=devid)
File "D:\Programs\Git\crazyflie-lib-python\cflib\drivers\crazyradio.py", line 121, in __init__
raise Exception('Cannot find a Crazyradio Dongle')
Exception: Cannot find a Crazyradio Dongle

jaymc
Beginner
Posts: 4
Joined: Mon Jun 04, 2018 8:53 pm

Re: "NO CRAZYFLIES FOUND, CANNOT RUN EXAMPLE" via basiclogSync.py

Post by jaymc » Thu Jun 14, 2018 1:30 pm

ok, so after looking a little more into the situation, I ran the scan.py file in examples and the execution displayed:

Exception while scanning for Crazyflie USB: module 'usb' has no attribute 'busses'
Scanning interfaces for Crazyflies...
Crazyflies found:


What do they mean by "'usb' has no attribute 'busses'"?

jaymc
Beginner
Posts: 4
Joined: Mon Jun 04, 2018 8:53 pm

Re: "NO CRAZYFLIES FOUND, CANNOT RUN EXAMPLE" via basiclogSync.py

Post by jaymc » Mon Jun 18, 2018 1:44 pm

Problem solved:
if anyone has this same problem, check the location of the python interpreter. Mine was set on a certain file, and not on the whole entire project directory crazyflie-lib-python itself.

Post Reply