UAL-RE / ReBACH

Python-based tool to enable data preservation to a cloud-hosted storage solution
MIT License
2 stars 2 forks source link

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

Closed zoidy closed 10 months ago

zoidy commented 10 months ago

Is there an existing issue for this?

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