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
I don't know why, but sometimes when I run enaDataGet not all of the files are downloaded. I can usually run the program again and it is fine, however I notice that the error message informs us how much was not downloaded but it doesn't specify which file is incomplete:
Error with FTP transfer: <urlopen error retrieval incomplete: got only 1083805828 out of 3179431281 bytes>
Could a change like this print an error of the exact file which wasn't downloaded properly?:
def get_ftp_file_with_md5_check(ftp_url, dest_dir, md5): try: filename = ftp_url.split('/')[-1] dest_file = os.path.join(dest_dir, filename) urlrequest.urlretrieve(ftp_url, dest_file) return check_md5(dest_file, md5) except Exception as e: sys.stderr.write("Error with FTP transfer: {0}\n".format(e)) sys.stderr.write("Error with FTP transfer occured for file: {}").format(filename)) return False
Thank you,
Tim
The text was updated successfully, but these errors were encountered:
orangebromeliad
changed the title
Add filename for failed or cinomplete downloads
Add filename for failed or incomplete downloads
Oct 15, 2019
Hi team,
I don't know why, but sometimes when I run enaDataGet not all of the files are downloaded. I can usually run the program again and it is fine, however I notice that the error message informs us how much was not downloaded but it doesn't specify which file is incomplete:
Error with FTP transfer: <urlopen error retrieval incomplete: got only 1083805828 out of 3179431281 bytes>
Could a change like this print an error of the exact file which wasn't downloaded properly?:
def get_ftp_file_with_md5_check(ftp_url, dest_dir, md5): try: filename = ftp_url.split('/')[-1] dest_file = os.path.join(dest_dir, filename) urlrequest.urlretrieve(ftp_url, dest_file) return check_md5(dest_file, md5) except Exception as e: sys.stderr.write("Error with FTP transfer: {0}\n".format(e)) sys.stderr.write("Error with FTP transfer occured for file: {}").format(filename)) return False
Thank you,
Tim
The text was updated successfully, but these errors were encountered: