Skip to content

Download stopped suddenly #1187

@Dreiev

Description

@Dreiev

Overview
I'm using the app from this repository to download my entire photo library from iCloud. The process worked perfectly for all years up to 2023, but it consistently fails when trying to download photos from 2022. The app throws a ConnectionResetError during authentication.

Steps to Reproduce
Run the app with the following command:

icloudpd.exe -d D:\iCloudPhotos -u [email protected] -p zzzzzzzzz
Observe successful downloads for photos from 2025, 2024, 2023.

Process halts and crashes when it reaches 2022 photos.

Expected Behavior
The app should continue downloading photos from 2022 and earlier years without interruption, just as it does for 2025–2023.

Actual Behavior
The app throws the following error:

ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
...
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
[PYI-30376:ERROR] Failed to execute script 'icloudpd' due to unhandled exception!

Context
Being able to retrieve older photos (2022 and earlier) is crucial for maintaining a full backup. This behavior disrupts that goal and forces manual intervention.

The same command worked previously, and nothing changed on my side (same OS, network, and credentials). It seems the problem might be related to a change in how requests are handled when fetching older media.

Log:

(base) PS D:\iCloudPhotos> icloudpd.exe -d D:\iCloudPhotos -u [email protected] -p zzzzzzzzz
2025-07-09 11:51:40 DEBUG Authenticating...
Traceback (most recent call last):
File "urllib3\connectionpool.py", line 716, in urlopen
File "urllib3\connectionpool.py", line 404, in make_request
File "urllib3\connectionpool.py", line 1061, in validate_conn
File "urllib3\connection.py", line 419, in connect
File "urllib3\util\ssl
.py", line 458, in ssl_wrap_socket
File "urllib3\util\ssl
.py", line 502, in _ssl_wrap_socket_impl
File "ssl.py", line 455, in wrap_socket
File "ssl.py", line 1076, in _create
File "ssl.py", line 1372, in do_handshake
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "requests\adapters.py", line 667, in send
File "urllib3\connectionpool.py", line 802, in urlopen
File "urllib3\util\retry.py", line 552, in increment
File "urllib3\packages\six.py", line 769, in reraise
File "urllib3\connectionpool.py", line 716, in urlopen
File "urllib3\connectionpool.py", line 404, in make_request
File "urllib3\connectionpool.py", line 1061, in validate_conn
File "urllib3\connection.py", line 419, in connect
File "urllib3\util\ssl
.py", line 458, in ssl_wrap_socket
File "urllib3\util\ssl
.py", line 502, in _ssl_wrap_socket_impl
File "ssl.py", line 455, in wrap_socket
File "ssl.py", line 1076, in _create
File "ssl.py", line 1372, in do_handshake
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "starters\icloudpd.py", line 6, in
File "click\core.py", line 1161, in call
File "click\core.py", line 1082, in main
File "click\core.py", line 1443, in invoke
File "click\core.py", line 788, in invoke
File "icloudpd\base.py", line 766, in main
File "icloudpd\base.py", line 1211, in core
File "icloudpd\authentication.py", line 53, in authenticate_
File "pyicloud_ipd\base.py", line 160, in init
File "pyicloud_ipd\base.py", line 174, in authenticate
File "pyicloud_ipd\base.py", line 368, in _validate_token
File "requests\sessions.py", line 637, in post
File "pyicloud_ipd\session.py", line 65, in request
File "requests\sessions.py", line 589, in request
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 682, in send
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
[PYI-30376:ERROR] Failed to execute script 'icloudpd' due to unhandled exception!
(base) PS D:\iCloudPhotos>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions