pymavlink icon indicating copy to clipboard operation
pymavlink copied to clipboard

mavtestgen.py is broken

Open rotu opened this issue 2 years ago • 1 comments

Trying to import mavtestgen crashes with an ImportError because of a bad relative import.

Further it has no test coverage and has seemingly been broken since at least as far back as https://github.com/ArduPilot/pymavlink/commit/a3c2bdbdba97a8f0146170f565d53a0c584f493b

rotu avatar Jul 05 '23 00:07 rotu

I think the import can be fixed by changing from . import mavparse to from .generator import mavparse.

But then it shows up another error...

$ python -m pymavlink.mavtestgen something.xml
AttributeError: module 'pymavlink.generator.mavparse' has no attribute 'parse_mavlink_xml'

shancock884 avatar Jan 18 '24 18:01 shancock884