icloud-drive-docker icon indicating copy to clipboard operation
icloud-drive-docker copied to clipboard

[BUG] Sometimes the download freezes

Open olfway opened this issue 1 year ago • 2 comments

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

olfway avatar Feb 28 '24 16:02 olfway

same here in Docker on Mac

SandraCHC avatar Feb 28 '24 19:02 SandraCHC