Using MAVSDK-Python example script to download logs

Hi,

I am trying to download PX4 logs using MAVSDK-Python/examples/logfile_download.py at b0e3e471a7d87a53d37d52ce74d96d07d90ad2b3 · mavlink/MAVSDK-Python · GitHub . When running with PX4 SITL, I keep receiving a timeout error:

Downloading: log 0 from 2025-10-03T14:04:39Z to ./log-2025-10-03T14-04-39Z.ulog
Timeout! (log_files_impl.cpp:380)
Requesting missing chunk:       0/2590 (log_files_impl.cpp:381)
Timeout! (log_files_impl.cpp:380)
Requesting missing chunk:       0/2590 (log_files_impl.cpp:381)

My end goal is to run GitHub - ARK-Electronics/logloader: Automatic PX4 Flight Log Upload / Download on a Raspberry Pi (for example) and be able to upload logs to my team’s RobotoAI dashboard where we can then automate the generation of Flight Reviews reports.

Logloader doesn’t work with PX4 SITL for me as MAVSDK is not able to download the logs.

However, log_streaming kind of works. It creates the log, but when I upload to flight review, it says the log contains corrupt data (https://logs.px4.io/plot_app?log=230690bd-b061-497e-a9bf-2eb76824fe0a).

Yes, I ran into this the other day and it wasn’t working with PX4 SITL because it sends too much data all at once and (for me) overflows the localhost UDP buffer.

You can either increase the localhost UDP buffer size of your system, or wait for my fixes: LogFiles fixup by julianoes · Pull Request #2654 · mavlink/MAVSDK · GitHub

1 Like

LogFiles fixup by julianoes · Pull Request #2654 · mavlink/MAVSDK · GitHub merged and released with v3.11.0 and later.