Mapillary_tools: reliable upload status

I’m using mapillary_tools for nearly all my uploads for a while now. With a lot of images to upload, I have a few simple scripts to handle this - in particular, I have a script to check upload status of image directories.

With older versions of mapillary_tools, the most reliable way I found was looking for a directory being processed, followed by “upload time” - this was printed only when all sequences had been fully uploaded.

Then, at some point (maybe when I upgraded to 0.14.0b1), output changed to show statistics even if uploading had partially failed. Now, instead of printing timing only when all sequences had been uploaded, it prints info like this:

2025-09-14 11:41:16,726 - INFO - 3 image sequences uploaded
2025-09-14 11:41:16,726 - INFO - 992.5M data in total
2025-09-14 11:41:16,727 - INFO - 992.5M data uploaded
2025-09-14 11:41:16,727 - INFO - 2217.5s upload time

That particular directory had 6 sequences.

This status output was followed by errors like this:

2025-09-14 11:41:16,727 - ERROR - Upload error: HTTPError: 400 Client Error: Bad Request for url: ``https://rupload.facebook.com/mapillary_public_uploads/mly_tools_eba…

Having seen it a few times, I did not expect it to indicate potentially large parts of the upload failing. In some cases, I had removed images, thus losing thousands of pictures.

With all this context in place - is there a reasonably simple and reliable way with the latest mapillary_tools version (0.14.4 at the time of this writing) to detect whether everything has been uploaded, or anything has failed? I’d like to gather this from the output, not rely on the exit code.

Trying to parse the number of detected sequences and then parse the number of uploaded sequences seems… very fragile.

And even counting the sequences and comparing that to the uploaded sequence number does not work - if some sequences fail initially and upload is re-run, the output now lists the initial number of sequences found, followed by the status number of sequences uploaded in that run (which will always be smaller than the total number).

There are errors like this:

2025-09-07 21:22:24,762 - ERROR - Upload error: UploadedAlreadyError:
2025-09-07 21:22:24,762 - ERROR - Upload error: UploadedAlreadyError:

But trying to parse anything like that and guess whether it is reliable.. nah.

Hi @Richlv it doesn’t look like you are running the latest MT v0.14.4 given the format of the logs. Can you confirm with mapillary_tools –version?

With all this context in place - is there a reasonably simple and reliable way with the latest mapillary_tools version (0.14.4 at the time of this writing) to detect whether everything has been uploaded, or anything has failed? I’d like to gather this from the output, not rely on the exit code.

If you are looking for a way to tell if a upload is failed or succeeded (i.e. yes or no), then exit code is most reliable way. Or, are you looking for a way to tell which files are failed or succeeded? If so then there is no reliable way. We can consider writing the information (uploaded or failed) into the description DB (after we migrate from JSON to sqlite3).

Thank you so much for the reply. Indeed, the version in the logs is the aforementioned 0.14.0b1, I upgraded to 0.14.4 on that day.

Looking for a way to determine status afterwards - processes could be terminated in different ways, return code wouldn’t always be available (although a missing one could be treated as a failure).

The idea to compare “Split sequences: 1 → 19” with “19 sequences uploaded” seems nice, but it breaks at the repeated uploads.

Is there perhaps something still in the output (like there was in older versions) that could indicate “all successful” vs “something’s not’“?

If there’s nothing at all, would it be possible to add some simple output like that, before the migration to sqlite backend? The current situation is extremely cumbersome for my workflow, and has resulted in a large amount of collected images gone :slight_smile:

Does it work if MT shows how many sequences/videos are failed and how many are uploaded after uploading is done?

1 Like

That sounds just perfect. If it printed out the number of uploaded, failed - and perhaps skipped because of already being uploaded? - sequences, it would help immensely.

1 Like