You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you do not specify an @maintainer tag in your airframe configuration but put a comment afterwards then the parsing fails with an unexpected error.
Expected behavior
The parser should either still work without maintainer tag or ask for a maintainer but not fail unexpectedly in the parsing state machine.
Log Files and Screenshots
[0/1294] git submodule platforms/nuttx/NuttX/nuttx
[1/1294] Creating airframes.xml
FAILED: airframes.xml
cd /home/maetugr/Firmware/build/px4_fmu-v5_default && /usr/bin/python3 /home/maetugr/Firmware/Tools/px_process_airframes.py --airframes-path /home/maetugr/Firmware/ROMFS/px4fmu_common/init.d --board CONFIG_ARCH_BOARD_px4_fmu-v5 --xml /home/maetugr/Firmware/build/px4_fmu-v5_default/airframes.xml
Traceback (most recent call last):
File "/home/maetugr/Firmware/Tools/px_process_airframes.py", line 138, in <module>
main()
File "/home/maetugr/Firmware/Tools/px_process_airframes.py", line 102, in main
if not scanner.ScanDir(args.airframes_path, parser):
File "/home/maetugr/Firmware/Tools/px4airframes/srcscanner.py", line 22, in ScanDir
if not self.ScanFile(path, parser):
File "/home/maetugr/Firmware/Tools/px4airframes/srcscanner.py", line 38, in ScanFile
return parser.Parse(path, contents)
File "/home/maetugr/Firmware/Tools/px4airframes/srcparser.py", line 366, in Parse
tags[current_tag] += "\n" + comment_content
KeyError: 'output'
[7/1294] ROMFS: copying, generating airframes
FAILED: genromfs/init.d/rcS genromfs/init.d/rc.serial genromfs/init.d/rc.autostart genromfs/init.d/rc.autostart.post ROMFS/romfs_copy.stamp
cd /home/maetugr/Firmware/build/px4_fmu-v5_default/ROMFS && /usr/bin/cmake -E remove_directory /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs && /usr/bin/cmake -E copy_directory /home/maetugr/Firmware/ROMFS/px4fmu_common /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs && /usr/bin/cmake -E remove_directory /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/init.d-posix && /usr/bin/cmake -E remove_directory /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/mixers-sitl && /usr/bin/cmake -E remove /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/mixers/CMakeLists.txt && /usr/bin/cmake -E remove /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/init.d/CMakeLists.txt && /usr/bin/cmake -E remove /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/init.d/airframes/CMakeLists.txt && /usr/bin/python3 /home/maetugr/Firmware/Tools/px_process_airframes.py --airframes-path /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/init.d --start-script /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/init.d/rc.autostart --board px4_fmu-v5 && /usr/bin/python3 /home/maetugr/Firmware/Tools/serial/generate_config.py --rc-dir /home/maetugr/Firmware/build/px4_fmu-v5_default/genromfs/init.d --serial-ports GPS1:/dev/ttyS0 TEL1:/dev/ttyS1 TEL2:/dev/ttyS2 TEL4:/dev/ttyS3 --config-files /home/maetugr/Firmware/src/lib/battery/module.yaml /home/maetugr/Firmware/src/drivers/distance_sensor/cm8jl65/module.yaml /home/maetugr/Firmware/src/drivers/distance_sensor/leddar_one/module.yaml /home/maetugr/Firmware/src/drivers/distance_sensor/sf0x/module.yaml /home/maetugr/Firmware/src/drivers/distance_sensor/tfmini/module.yaml /home/maetugr/Firmware/src/drivers/distance_sensor/ulanding_radar/module.yaml /home/maetugr/Firmware/src/drivers/dshot/module.yaml /home/maetugr/Firmware/src/drivers/gps/module.yaml /home/maetugr/Firmware/src/drivers/rc_input/module.yaml /home/maetugr/Firmware/src/drivers/roboclaw/module.yaml /home/maetugr/Firmware/src/drivers/telemetry/frsky_telemetry/module.yaml /home/maetugr/Firmware/src/drivers/telemetry/hott/hott_telemetry/module.yaml /home/maetugr/Firmware/src/drivers/telemetry/iridiumsbd/module.yaml /home/maetugr/Firmware/src/modules/battery_status/module.yaml /home/maetugr/Firmware/src/modules/mavlink/module.yaml && /usr/bin/cmake -E touch romfs_copy.stamp
Traceback (most recent call last):
File "/home/maetugr/Firmware/Tools/px_process_airframes.py", line 138, in <module>
main()
File "/home/maetugr/Firmware/Tools/px_process_airframes.py", line 102, in main
if not scanner.ScanDir(args.airframes_path, parser):
File "/home/maetugr/Firmware/Tools/px4airframes/srcscanner.py", line 22, in ScanDir
if not self.ScanFile(path, parser):
File "/home/maetugr/Firmware/Tools/px4airframes/srcscanner.py", line 38, in ScanFile
return parser.Parse(path, contents)
File "/home/maetugr/Firmware/Tools/px4airframes/srcparser.py", line 366, in Parse
tags[current_tag] += "\n" + comment_content
KeyError: 'output'
[11/1294] Generating uORB topic headers
ninja: build stopped: subcommand failed.
make: *** [Makefile:202: px4_fmu-v5] Error 1
I had a quick look but didn't see the problem immediately... probably needs debugging if important enough.
The text was updated successfully, but these errors were encountered:
I think I encountered this error a while back too - I don't think general non-tag comments are supported by the parser. My solution was to add a "@desc" tag that is ignored by the parser, allowing you to write a multi-line comment. I can put a PR in for this (pretty small change).
Describe the bug
If you do not specify an
@maintainer
tag in your airframe configuration but put a comment afterwards then the parsing fails with an unexpected error.@cmic0 found the bug originally.
To Reproduce
Steps to reproduce the behavior:
# Some comment
make clean
make px4_fmu-v5
Expected behavior
The parser should either still work without maintainer tag or ask for a maintainer but not fail unexpectedly in the parsing state machine.
Log Files and Screenshots
I had a quick look but didn't see the problem immediately... probably needs debugging if important enough.
The text was updated successfully, but these errors were encountered: