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: connection errors during file download are not handled #81

Closed
1 task done
zoidy opened this issue Oct 26, 2023 · 0 comments · Fixed by #83
Closed
1 task done

Bug: connection errors during file download are not handled #81

zoidy opened this issue Oct 26, 2023 · 0 comments · Fixed by #83
Labels
bug Something isn't working
Milestone

Comments

@zoidy
Copy link
Collaborator

zoidy commented Oct 26, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

If an http error happens during the download of a file from figshare, the error is not handled and the program exits. The error should be handled and the download retried.

Steps To Reproduce

During the download of a file, if the connection is interrupted, the error will be thrown and the program will exit.

e.g., the error requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) is thrown on the following line.
''''
File "/home/u17/frios/ReBACH/figshare/Article.py", line 352, in __download_files
with requests.get(file['download_url'], stream=True, allow_redirects=True,
'''

Need a try catch around all blocks containing file downloads

@zoidy zoidy added the bug Something isn't working label Oct 26, 2023
@zoidy zoidy added this to the v1.0.0 milestone Oct 26, 2023
@zoidy zoidy linked a pull request Oct 26, 2023 that will close this issue
@zoidy zoidy closed this as completed in #83 Oct 26, 2023
zoidy added a commit that referenced this issue Oct 26, 2023
…le-download-are-not-handled

Fix: add retries to file downloading (Issue #81)
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

Successfully merging a pull request may close this issue.

1 participant