Python 'E325: Attention' error



My Pixhawk drone has been built and flying like a charm, using the Remote Controller. But I’ve run into some issues with the automated side of things. Specifically, I’m simply following the tutorial steps - - from 21:00-28:00.

The drone ‘armed’ successfully, using MavProxy (27:15), without any issues (on my first attempt only).

On my 2nd attempt, I once again installed all of the Python dependencies using Putty and followed the above steps. I did this on the basis that I had no prior confirmation (whilst logged into Putty) that all of the steps/actions had been cemented/written permanently during my 1st session. I’m merely guessing that repeating all of the steps is what led to me (not) being able to ‘arm’ on a subsequent attempt. Unfortunately I’m unable to recall which exact attempt this was …

In case the screenshot below doesn’t open, here is a copy/pasted Putty response following my ‘ --master=/dev/ttyAMA0’ command:

Traceback (most recent call last):

File "/usr/local/bin/", line 44, in <module>

from MAVProxy.modules.mavproxy_link import preferred_ports

File "/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/", line 17, in <module>

from MAVProxy.modules.lib.wx_addlink import MPMenulinkAddDialog

File "/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/lib/", line 6, in <module>

import wx”

File "/home/pi/.local/lib/python3.9/site-packages/wx/", line 17, in <module>

**from wx.core import ***

File "/home/pi/.local/lib/python3.9/site-packages/wx/", line 12, in <module>

**from ._core import ***

ImportError: cannot open shared object file: No such file or directory

I recognise that if the drone can no longer be armed, it’s probably useless to attempt the subsequent DroneKit mission writing … But in any case, when I now enter the ‘vi’ command, Putty responds with the (attached) ‘E325: Attention’ error. If the attachment fails to open for whatever reason, here is the copy/pasted response:



Found a swap file by the name ""

owned by: pi dated: Fri Apr 29 08:23:15 2022

file name: ~pi/

modified: YES

user name: pi host name: raspberrypi

process ID: 2088

While opening file ""

dated: Fri Apr 29 08:39:04 2022

NEWER than swap file!

(1) Another program may be editing the same file. If this is the case,

be careful not to end up with two different instances of the same

file when making changes. Quit, or continue with caution.

(2) An edit session for this file crashed.

If this is the case, use ":recover" or "vim -r"

to recover the changes (see ":help recovery").

If you did this already, delete the swap file ""

to avoid this message.

"" 100 lines, 1491 bytes

Press ENTER or type command to continue

I’m just a beginner to the coding side of things, and I couldn’t find much help online. So I figured that I could possibly just reflash the MissionPlanner firmware onto a (new/formatted) SD Card and start from scratch (installing Python dependencies before ‘arming’). Upon doing so, the ‘Advanced IP Scanner’ doesn’t recognize the new SD card, but it (does) recognize the old SD card.

I also connected the telemetry cable to another functional Raspberry Pi 4, and repeated the above process, but again, the ‘Advanced IP Scanner’ doesn’t recognise the new SD card, while recognising the old SD card.

I followed this Dojo Troubleshooting Guide: , which I found online, and can confirm that I’ve actioned the ‘Common Reasons’ #: 1, 3, 4, 6, 8 recommendations, but the issue persists. I struggle to see how the remaining Reasons could be a culprit, and/or I’m struggling to wrap my head around the recommendations anyhow …

Please let me know if there’s anything you can suggest

Best regards


Hello @BJ4

As a first step, why don’t you list out your build steps, especially the statement for installing all the dependencies?



Hello Jack

Please forgive my ignorance; I’m very new to programming …

By “build steps” and a “statement for installing all the dependencies?”, are you suggesting I provide screenshots (for example) of all my dependency/package installation steps? If so, I’m more than happy to provide these.



In the meantime, I thought I should also mention the following (which might be quite significant):

When I install the dependencies (as per tutorial steps/commands), I receive the following/attached error:

As a result of installing Python’s suggested: “sudo apt-get install python3-pip”, other packages failed to install, e.g. “sudo apt-get install screen python-wxgtk4.0 python-lxml”. Eventually, I realised with the help of random online forums, that I had to streamline the package (versions), i.e. the following commands (versions slightly modified) allowed me to install (all) of the packages without any issues:

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install python3-pip
  • sudo apt-get install python3-dev
  • sudo pip install future
  • sudo apt-get install screen python3-wxgtk4.0 python3-lxml
  • sudo pip install pyserial
  • sudo pip install dronekit
  • sudo pip install MAVProxy

Kind regards


You are on the right track. I am not sure if Caleb switched from Python2, but I am using python3/pip3.

I start with a fresh install of the latest Raspberry Pi OS.

In addition to your code, I also normally include:

sudo apt install python3-opencv python3-matplotlib python3-pygame


sudo pip3 PyYAML mavproxy

and remember:

sudo usermod -a -G dialout $USER
sudo apt remove modemmanager

these might already by satisfied:

sudo pip3 install pyserial
sudo pip3 install future

sudo pip3 install dronelit

If you run into a problem I will list out the entire sequence to use.



“Starting with a fresh install of the latest Raspberry Pi OS” proved a little challenging …

I spent a few hundred dollars of private tutoring from around the globe, trialling about 5 SD cards (due to: Etcher flash failure, SSH connection, etc. issues), 2 Raspberry Pi (RPIs), various RPI OSs, e.g. Legacy & Desktop (non-‘Lite’) versions, etc. …

This enabled me to finally do an error-free installation of all the required dependencies, as per the following tutorial which uses the ‘Buster’, rather than the current ‘Bullseye’, OS:

I would have provided the “build steps” for this, but since everything installed (exactly) as per the tutorial, I saw no need to screenshot everything. However, if you’d like me to nevertheless prepare these, please let me know. I have however attached a (current) ‘pip list’. It’s the closest thing that I find that may be similar of a “statement for installing all the dependencies”. Can you please suggest how I can obtain such a statement?

I did manage to ‘arm’ the drone (earlier) when using Bullseye, until Python told me that DroneKit is (not) installed, even though executing a ‘pip list’ command clearly shows that DroneKit was installed (attached). But the most recent error is (attached), i.e. “MAV> link 1 down … ”. If (if) it helps, I can confirm that I have Mission Planner 1.3.23 & ArduCopter V4.0.3 installed on the Board …

Please advise if there’s anything you can suggest.

Kind regards



I am not sure Ben, perhaps there is a mix up of python and pip versions used. Note from my previous message I was using ‘pip3’ wherever it is used.

I have written a blog article if you continue to experience connection errors.


I might be missing something, but in your “blog article”, is pin#2 (from left to right) representing ‘RX’ or ‘TX’? Because your diagram seems to be at odds with Caleb’s … I’ve indicated what I’m referring to by yellow circles in the screenshots below.

I also found the mention of possible “telemetry connection reversal” in an ArduPilot forum (screenshot below), but I’m not sure if it’s related … -


Other than Reason #1, I can confirm that issues: 2, 3, 4, 6, 8, are not a culprit to the “MAV> link 1 down” error. The Reason 5 solution I’m not familiar with as it hasn’t been explained in any of the lead-up tutorials …

For Step 7, I’m also not familiar with what exaclty is required. I only know that I can modify the required settings at the Mission Planner page (screenshot below):

Looks like I’ll possibly have to organise extra, paid, external Tutoring classes so that I can progress. But I wonder if this matters at all to Dojo Drones, e.g. in the (screenshot below) you can see the level of Support that I’m receiving …

Shortly after receiving the drone kit via postage, ‘reverse polarity’ occurred (parts of the drone were permanently destroyed) as a result of the provided XT60-Deans adapter having a serious manufacturing fault. I definitely appreciate Caleb’s support, here & there, back then, via email. But the vast majority of the drone restoration was my own effort over the last few months.

The drone currently flies well in all the required modes (via remote control), but I can’t be absolutely certain that the Flight Controller hasn’t been damaged, which (might?) be interfering with the (autonomous) flight aspect. And yes, I did purchase the warranty/insurance option as part of my drone kit order.

I’ve therefore had to turn to external Tutors, as well as an industry contact. Two of the Tutors I’ve met with are a Programming university lecturer, & a Programmer that holds a PhD in programming, respectively. The industry contact is a semi-retired embedded systems engineer, who served the Royal Australia Air Force for many years, & has experience in teaching programming. It’s probably best that I don’t mention here how bitter his opinion is regarding the many teaching/support gaps in the Dojo Drone course, which includes “beginners” for its targeted market - , but it ain’t pretty …

While I try to figure out what to make of all this, maybe you could “list out the entire sequence to use”, as you offered in an earlier message (screenshot below) …

Also, at the following web page, please specify which exact OS I should be using, but also considering that if you suggest that I install a version other than the ‘Buster, December 2020, 32-bit, Lite’ version that was demonstrated in the Dojo Tutorial, I’ll potentially require lots of support from this forum if I run into any issues: . And if you think that a ‘Desktop’ (non-lite)/full, or even ‘Legacy’ version may be more appropriate, please also mention this …


Ok. I managed to arm the drone. I’m not sure exactly waht helped solved the issue, but I did use a spare/new Raspberry Pi 4 & SD card, & installed a fresh RPI OS version (Legacy, Desktop, December 2021), given that the RPI website recommends Legacy for “educational users who would like to follow instructions and tutorials online”: