Servers by jDrones

No module named pymavlink ERROR

when trying to run: -w

I am getting an error saying:

Traceback (most recent call last):
File “/home/odroid/ardupilot/Tools/autotest/”, line 25, in
from pymavlink import mavextra
ImportError: No module named pymavlink

I was wondering if anyone has come across this error or knows what I am needing to do to stop this from happening. Thanks.

you can install pymavlink with pip

pip install -U pymavlink

a search in the ardupilot source code found this:

13:* Source: Mavlink Generator
14:* Discussion: Gitter Channel

I just happened to need the latest version of ardupilot, so i cloned the repo again. After the initial git clone command you need to cd to the ardupilot directory and run:
git submodule update --init --recursive

That will sync and download various submodules need by ardupilot, and I noticed pymavlink was one of them.

I did the pip install. Now I am left with this error.

RiTW: Starting APMrover2 : /home/odroid/ardupilot/build/sitl/bin/ardurover -S -I0 --model rover --speedup 1 --defaults /home/odroid/ardupilot/Tools/autotest/default_params/rover.parm
[Run MavProxy] An exception has occurred with command: ‘ --master tcp: --sitl --out --out --map --console’
[Errno 2] No such file or directory
SIM_VEHICLE: Killing tasks

you need to update the submodules under ardupilot:

after git cloning, cd to ardupilot directory and run
git submodule update --init --recursive

that will download many more modules needed by ardupilot, including the python scripts you are missing.

you should also run git submodule update --recursive after updating ardupilot, for example when checking out a branch or running git origin pull.

when I do either of the commands you say it does not show anything on my screen. I hit enter and then it just goes straight to the next line waiting for another command. Thanks

also after I run -w -v ArduCopter. I get that output still but I forgot to say that I get another screen called ArduCopter and it says stuff and the last line is waiting for connection…

what directory are you running the command from? I need to look into running SITL. Did you have to build ardupilot first? Without submodules the build should have failed.

it is working now for some reason.

It takes a couple of minutes to start on my laptop. If necessary you can install mavproxy with pip.

Servers by jDrones