# Using MAVSDK-Python example script to download logs

**URL:** <https://discuss.px4.io/t/using-mavsdk-python-example-script-to-download-logs/47579>\
**Category:** Uncategorized\
**Created:** [October 3, 2025, 5:35pm UTC](https://discuss.px4.io/t/using-mavsdk-python-example-script-to-download-logs/47579 "2025-10-03T17:35:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aniruddha236](https://discuss.px4.io/user_avatar/discuss.px4.io/aniruddha236/32/16556_2.png) [@aniruddha236](https://discuss.px4.io/u/aniruddha236)\
**Post date:** [October 3, 2025, 5:35pm UTC](https://discuss.px4.io/t/using-mavsdk-python-example-script-to-download-logs/47579/1 "2025-10-03T17:35:50Z")

</div>

Hi,

I am trying to download PX4 logs using [MAVSDK-Python/examples/logfile\_download.py at b0e3e471a7d87a53d37d52ce74d96d07d90ad2b3 · mavlink/MAVSDK-Python · GitHub](https://github.com/mavlink/MAVSDK-Python/blob/b0e3e471a7d87a53d37d52ce74d96d07d90ad2b3/examples/logfile_download.py) . When running with PX4 SITL, I keep receiving a timeout error:

```bash
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](https://github.com/ARK-Electronics/logloader) 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](https://github.com/mavlink/MAVSDK/blob/b3355c3ab6d58ef349d76d31d17a323e4ab8f1dc/examples/log_streaming/log_streaming.cpp) 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](https://logs.px4.io/plot_app?log=230690bd-b061-497e-a9bf-2eb76824fe0a)).

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [October 4, 2025, 12:30am UTC](https://discuss.px4.io/t/using-mavsdk-python-example-script-to-download-logs/47579/2 "2025-10-04T00:30:03Z")

</div>

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](https://github.com/mavlink/MAVSDK/pull/2654)

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [December 4, 2025, 2:39am UTC](https://discuss.px4.io/t/using-mavsdk-python-example-script-to-download-logs/47579/3 "2025-12-04T02:39:56Z")

</div>

[LogFiles fixup by julianoes · Pull Request #2654 · mavlink/MAVSDK · GitHub](https://github.com/mavlink/MAVSDK/pull/2654) merged and released with v3.11.0 and later.
