mandarons / icloud-drive-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
962 stars 46 forks source link

[BUG] Sometimes the download freezes #196

Open olfway opened 4 months ago

olfway commented 4 months ago

Describe the bug App downloading files and once in a while it just stucks

If I press ctrl+c I see this:

  File "/app/./src/main.py", line 7, in <module>
    sync.sync()
  File "/app/src/sync.py", line 87, in sync
    sync_photos.sync_photos(config=config, photos=api.photos)
  File "/app/src/sync_photos.py", line 174, in sync_photos
    sync_album(
  File "/app/src/sync_photos.py", line 129, in sync_album
    process_photo(photo, file_size, destination_path, files, folder_format)
  File "/app/src/sync_photos.py", line 114, in process_photo
    download_photo(photo, file_size, photo_path)
  File "/app/src/sync_photos.py", line 88, in download_photo
    shutil.copyfileobj(download.raw, file_out)
  File "/usr/local/lib/python3.10/shutil.py", line 195, in copyfileobj
    buf = fsrc_read(length)
  File "/app/venv/lib/python3.10/site-packages/urllib3/response.py", line 567, in read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/app/venv/lib/python3.10/site-packages/urllib3/response.py", line 533, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/usr/local/lib/python3.10/http/client.py", line 466, in read
    s = self.fp.read(amt)
  File "/usr/local/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/usr/local/lib/python3.10/ssl.py", line 1307, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/local/lib/python3.10/ssl.py", line 1163, in read
    return self._sslobj.read(len, buffer)
KeyboardInterrupt

So it looks like as network issue, but probably it should timeout and retry

To Reproduce Start sync and wait

Additional context I'm using latest version

SandraCHC commented 4 months ago

same here in Docker on Mac