Skip to content

[BUG] Handle HTTP Gone 410 #386

@olivier-lu

Description

@olivier-lu

Describe the bug
I have a large Photos library which I am trying to download to my local drive (1TB 60k+ photos). After some times, I get the following error:

2025-11-28 23:27:30,888 :: ERROR :: root :: photo_file_utils.py :: 96 :: Failed to download /icloud/photos/all/2016/11/DSC01858__original__QVhveVRNUGRReFAycnhaQWVESDdHL0UrUFNJcw==.jpg: Gone (410)
2025-11-28 23:27:31,043 :: ERROR :: icloudpy.base :: base.py :: 176 :: Gone (410)

When this error happens, all the following photos failed to download but the system keeps on trying to download the photos (so it stays hour trying to download photos).

It would be nice if when the system detects a 410 error, it tries to get a new token/url for the asset.

To Reproduce
Sync a large library from scratch:

Expected behavior
It would be nice if there was a better handling and once 410 appears, the system tries to get new download links?

Screenshots
Logs:

2025-11-28 20:46:10,355 :: INFO :: root :: album_sync_orchestrator.py :: 60 :: Syncing All Photos
2025-11-28 21:11:53,090 :: INFO :: root :: photo_download_manager.py :: 222 :: Starting parallel photo downloads with 8 threads for 59314 photos...
2025-11-28 21:11:53,092 :: INFO :: root :: photo_file_utils.py :: 79 :: Downloading /icloud/photos/all/2025/11/IMG_6283__original__QVc2R21BZmJiclBSTW1hTnJ6cWROOFJUNGhRLw==.HEIC ...
…
2025-11-28 21:46:26,303 :: INFO :: root :: photo_file_utils.py :: 79 :: Downloading /icloud/photos/all/2025/10/IMG_5684__original__QWY2U2FtQ2U0K3hyaWdUVWJ3SHhGbiszeDg3cg==.HEIC ...
2025-11-28 21:46:26,600 :: ERROR :: icloudpy.base :: base.py :: 176 :: Gone (410)
2025-11-28 21:46:26,600 :: ERROR :: root :: photo_file_utils.py :: 96 :: Failed to download /icloud/photos/all/2025/10/IMG_5684__original__QWY2U2FtQ2U0K3hyaWdUVWJ3SHhGbiszeDg3cg==.HEIC: Gone (410)
…
2025-11-28 23:27:31,043 :: ERROR :: icloudpy.base :: base.py :: 176 :: Gone (410)
2025-11-28 23:27:31,044 :: ERROR :: root :: photo_file_utils.py :: 96 :: Failed to download /icloud/photos/all/2015/10/IMG_3898__original__QVRMN295bHR5SEViZHJkUXNhVHdVcDNHVkpURw==.JPG: Gone (410)
2025-11-28 23:27:31,047 :: INFO :: root :: photo_download_manager.py :: 245 :: Photo processing complete: 564 successful, 58750 failed

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions