-
Notifications
You must be signed in to change notification settings - Fork 2
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
Check download #7
base: main
Are you sure you want to change the base?
Conversation
Pending tests... |
This solution does not seem to be working as expected. According to the log files, the condition at line 132 is not being met, even when a file download fails (see the error log below). Despite the failure, the check for file completeness does not seem to catch the error. Error log
|
I have modified the block to check downloaded files, introducing specific exception handling for the IncompleteRead exception that may be raised during execution (commit 0346d0f). This exception should trigger another download attempt, up to a maximum number of attempts. If the maximum is reached, the exception should be passed to the main function to block its execution (see #12) |
The last solution (along with #12) seems to be working well. However, I was unable to capture the specific exception raised by urllib. |
Testing this one extensively is very hard, if you had some positive feedback I think we can merge |
On my side, this implementation works as expected (see the last log above). Nevertheless, the code handles a general exception, restarting the download a fixed number of times, after which another exception is raised (see the class definition at line 14). The key point is that this last exception raised by 'year_retrieve' should be reported to the calling function (see #12 ) and should block the execution of the main program. |
Sorry for my processing time! I can merge this if you agree! |
Added completeness check for downloaded files in the year_retrieve function of the CDS_retrieve module.