From a74674b076096f1f4cb0bf721f50358b4d08c3d2 Mon Sep 17 00:00:00 2001 From: Stephen Roller Date: Mon, 30 Aug 2021 09:47:50 -0400 Subject: [PATCH] Better error message on download failures. --- parlai/core/build_data.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parlai/core/build_data.py b/parlai/core/build_data.py index 9a707905154..72654b33add 100644 --- a/parlai/core/build_data.py +++ b/parlai/core/build_data.py @@ -74,8 +74,9 @@ def checksum(self, dpath): # remove_dir(dpath) raise AssertionError( f"Checksum for {self.file_name} from \n{self.url}\n" - f"does not match the expected checksum:\n{sha256_hash.hexdigest()} != {self.hashcode}" - "\n\nPlease try again." + f"does not match the expected checksum:\n" + f"{sha256_hash.hexdigest()} (received) != {self.hashcode} (expected)\n" + f"\nPlease try again. You may need to manually delete {self.filename}." ) else: logging.debug("Checksum Successful")