ArduPilot / ArduPilot/MAVProxy
Map can't be loaded and then it can't be viewed in the logs
- Dominant language
- Python
- Stars
- 595
- Forks
- 773
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 18
Description
There is a logs that appears when I run the simulation and want to have map with me.
/venv-ardupilot/lib/python3.12/site-packages/MAVProxy/modules/mavproxy_map/mp_tile.py:601: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
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 "/venv-ardupilot/lib/python3.12/site-packages/MAVProxy/modules/mavproxy_map/mp_slipmap.py", line 87, in child_task
self.mt = mp_tile.MPTile(download=self.download,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv-ardupilot/lib/python3.12/site-packages/MAVProxy/modules/mavproxy_map/mp_tile.py", line 210, in init
self._loading = mp_icon('loading.jpg')
^^^^^^^^^^^^^^^^^^^^^^
File "/venv-ardupilot/lib/python3.12/site-packages/MAVProxy/modules/mavproxy_map/mp_tile.py", line 615, in mp_icon
img = cv2.imdecode(raw, cv2.IMREAD_COLOR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.11.0) 👎 error: (-5:Bad argument) in function 'imdecode'
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the map failure in the simulation and inspect mavproxy_map/mp_tile.py around the pkg_resources import, MPTile initialization, and mp_icon's cv2.imdecode call. Trace how mavproxy_map/mp_slipmap.py starts the child task; done means the map loads and can be viewed without the reported traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- opencv, python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100