Closed itati01 closed 4 years ago
Sorry for the delay. Can you maybe reproduce why getHdf()
's integrity check, which is being run directly before the code you inserted, does not capture that? I believe capturing corrupted .hdf files in there would be a slightly more stringent approach.
Just tested it again with tileH=18 and tileV=4.
getHDF
is reporting that a file is corrupt and starts re-downloading it, which fails.The fact that there is a corrupt (empty) file after a failed download is causing the issue in runGdal. However, it might be more appropriate to address it in getHDF()
or even in ModisFileDownloader()
. Actually, I don't know which process created but not removed the empty temp file (curl? wget?). Interestingly, it remains only for the last date.
Alright, thanks for having another look into this and issuing a PR. Seems like your solution should be the safest way to capture this for now.
This pull request fixes the issue #93. If files are empty or otherwise corrupt and
checkIntegrity == True
(default), they will be silently skipped to avoid an error message ingetSds
.