MavExplorer on Ubuntu 26.04.1 LTS

Yup, I’m back at it…

MavExplorer was running just fine on this hardware, until yesterday. I saw there was an update noted in Discord so I ran:

python3 -m pip install mavproxy pymavlink --user --upgrade

Now when I run MavExplorer, it starts, I can use the GUI to open up a log file. The map feature works. But it will not graph anything. It doesn’t matter if I use the GUI for a saved graph, or command line. I get the following (The first errors are from a GUI based graph) :

allister@macbook:~$ MAVExplorer.py 
/home/allister/venv-ardupilot/bin/MAVExplorer.py:38: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
MAV> 19:46:55: Debug: window wxMenuBar@0x2cda26c0 ("menubar") lost focus even though it didn't have it
ERROR in command [':0']: 
19:47:10: Debug: window wxMenuBar@0x2d0f6dd0 ("menubar") lost focus even though it didn't have it
19:47:12: Debug: window wxTextCtrl@0x2cda7930 ("text") lost focus even though it didn't have it

MAV> graph ATT.DesRoll ATT.Roll ATT.DesPitch ATT.Pitch
MAV> ERROR in command ['ATT.DesRoll', 'ATT.Roll', 'ATT.DesPitch', 'ATT.Pitch']: 

MAV> 

I went back and re-ran the ubuntu dev environment scripts, but that didn’t help. Anyone have a suggestion? Thanks.

Do you use a custom screen resolution?

Nope. It’s an old macbook, so I keep everything pretty default not to max it out any more than it already is. I am running a second monitor. Have been for ages on this setup.

Just asking because I had it before that after an upgrade the support for custom screen resolution suddenly stopped working. (Can’t remember what the application was, which was impacted).

No difference when unplugging external screen?

Anyway, I guess you are on Wayland whilst I am still on X11.

Unplugging the monitor didn’t work. Figured I’d try that since you mentioned screen size.

Yes, it’s wayland. I’ve never given much thought to wayland vs X11.

Yes, once I upgrade this computer to 26.04 I also will be on Wayland.

I’ve been running it just fine under Wayland for quite some time. Not sure if it asks for the underlying xwayland support or not, but I do have that installed.

I have not tried the latest update yet.

I’ve re-run the Dev script and now when I try to graph something I get:

MAV> graph GPS.Alt
MAV> Process Process-3:
Traceback (most recent call last):
  File "/usr/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/allister/venv-ardupilot/lib/python3.12/site-packages/MAVProxy/modules/lib/grapher.py", line 774, in show
    self.plotit(self.x, self.y, lab, colors=col, title=self.title, interactive=interactive)
  File "/home/allister/venv-ardupilot/lib/python3.12/site-packages/MAVProxy/modules/lib/grapher.py", line 439, in plotit
    new_lines = ax.plot_date(x[i], y[i], fmt=color, label=fields[i],
                ^^^^^^^^^^^^
AttributeError: 'Axes' object has no attribute 'plot_date'

But it will create maps.

Best guess is a Python version mismatch or a module version mismatch. I can’t look at it very closely right away.

Thanks to some fumbling about with an LLM, it seems that it was an issue with Matplotlib. I was on 3.11, so reverting to 3.10.9 has Mavexplorer graphing again.

pip install "matplotlib<3.11"