Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Sometimes the download freezes #196

Open
olfway opened this issue Feb 28, 2024 · 1 comment
Open

[BUG] Sometimes the download freezes #196

olfway opened this issue Feb 28, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@olfway
Copy link

olfway commented Feb 28, 2024

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 olfway added the bug Something isn't working label Feb 28, 2024
@SandraCHC
Copy link

same here in Docker on Mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants