You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could try to enhance the check for file existance by validating the file size. This way we can differentiate fully downloaded files from files where the download was interrupted.
importcdsapic=cdsapi.Client()
r=c.retrieve(...) # make a request and start the downloading processr.content_length# bytes>>>65337064
r.content_length will return the size of the file in bytes. This can be compared to Path(...).stat().st_size.
This way we can skip existing files if they match the right content_length, and otherwise overwrite them.
We could try to enhance the check for file existance by validating the file size. This way we can differentiate fully downloaded files from files where the download was interrupted.
r.content_length
will return the size of the file in bytes. This can be compared toPath(...).stat().st_size
.This way we can skip existing files if they match the right
content_length
, and otherwise overwrite them.Originally posted by @BSchilperoort in #155 (comment)
The text was updated successfully, but these errors were encountered: