Page 1 of 1

ImportError: No module named cflib.crtp

Posted: Thu Dec 24, 2020 10:16 pm
by thefeiyu
Hello,

I am trying to use the command:
python position_commander_demo.py

When I run it, it gives me this error:
Traceback (most recent call last):
File "position_commander_demo.py", line 34, in <module>
import cflib.crtp
ImportError: No module named cflib.crtp

How do I fix this error?

Thanks!

Re: ImportError: No module named cflib.crtp

Posted: Mon Dec 28, 2020 10:34 am
by kimberly
It seems that cflib has not been installed on your computer.

Could you run the following command in your terminal?

Code: Select all

pip3 install cflib
Also make sure that your python version is 3.0 or up. Or else use

Code: Select all

python3 position_commander_demo.py

Re: ImportError: No module named cflib.crtp

Posted: Mon Dec 28, 2020 10:54 pm
by thefeiyu
I have used these commands and it is working now, thank you!

I have also run into another problem when I use the "python3 position_commander_demo.py", it gives me this error: "usb.core.USBError: [Errno 16] Resource busy".

Could you please help me with this problem? Thank you!

Re: ImportError: No module named cflib.crtp

Posted: Tue Dec 29, 2020 9:02 am
by kimberly
Perfect!

that error code means that the USB port of your crazyradio is already been used. This is for instance if you have the cfclient connected to the crazyflie but you want to run a separate pythonscript on that same crazyflie as well using the same crazyradio. This is not possible so you would need to disconnect the crazyflie from the cfclient first.

If this is not the case, usually a quick disconnect and connect of the Crazy radio PA quickly fixes things as well.