ArduPilot / ArduPilot/MAVProxy

Map/Console other UI : Fails to load on Python 3.14

Open
#1,673 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
595
Forks
773
Avg merge
2d 6h
Merged PRs (30d)
18

Description

Apparently this is due to Python 3.14's tightened requirements for how it spawns new processes.

```
MANUAL> module load map
MANUAL> ERROR in command ['load', 'map']: module '__main__' has no attribute '__spec__'
Traceback (most recent call last):
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/EGG-INFO/scripts/mavproxy.py", line 826, in process_stdin
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/EGG-INFO/scripts/mavproxy.py", line 624, in cmd_module
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/EGG-INFO/scripts/mavproxy.py", line 388, in load_module
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/MAVProxy/modules/mavproxy_map/__init__.py", line 1549, in init
return MapModule(mpstate)
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/MAVProxy/modules/mavproxy_map/__init__.py", line 88, in __init__
self.map = mp_slipmap.MPSlipMap(service=service, elevation=elevation, title=title)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/MAVProxy/modules/mavproxy_map/mp_slipmap.py", line 65, in __init__
self.child.start()
~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.14/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.14/multiprocessing/context.py", line 230, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3.14/multiprocessing/context.py", line 306, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__
super().__init__(process_obj)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3.14/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/usr/lib/python3.14/multiprocessing/spawn.py", line 193, in get_preparation_data
main_mod_name = getattr(main_module.__spec__, "name", None)
^^^^^^^^^^^^^^^^^^^^
AttributeError: module '__main__' has no attribute '__spec__'. Did you mean: '__doc__'?
'MapModule' object has no attribute 'default_popup'
Traceback (most recent call last):
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/EGG-INFO/scripts/mavproxy.py", line 1102, in periodic_tasks
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/MAVProxy/modules/mavproxy_wp.py", line 124, in idle_task
super(WPModule, self).idle_task()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/MAVProxy/modules/lib/mission_item_protocol.py", line 312, in idle_task
self.idle_task_add_menu_items()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/MAVProxy/modules/lib/mission_item_protocol.py", line 331, in idle_task_add_menu_items
self.module('map').add_menu(self.menu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/andre/.local/lib/python3.14/site-packages/MAVProxy-1.8.74-py3.14.egg/MAVProxy/modules/mavproxy_map/__init__.py", line 165, in add_menu
self.default_popup.add(menu)
^^^^^^^^^^^^^^^^^^
AttributeError: 'MapModule' object has no attribute 'default_popup'

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with MAVProxy/modules/mavproxy_map/mp_slipmap.py at MPSlipMap.__init__, especially self.child.start(), and reproduce loading the map module under Python 3.14. Trace the multiprocessing child setup and verify that map initialization completes without the __main__.__spec__ or default_popup errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.