From a1ea4e0948aebb5c43fa6c96d1643749ed7c9630 Mon Sep 17 00:00:00 2001 From: Vincent Quenneville-Belair Date: Mon, 25 Nov 2019 14:41:49 -0500 Subject: [PATCH] correct file_obj reference. --- torchaudio/datasets/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchaudio/datasets/utils.py b/torchaudio/datasets/utils.py index 545a12bc41..5b176a3b0b 100644 --- a/torchaudio/datasets/utils.py +++ b/torchaudio/datasets/utils.py @@ -183,7 +183,7 @@ def validate_file(file_obj, hash_value, hash_type="sha256"): while True: # Read by chunk to avoid filling memory - chunk = f.read(1024 ** 2) + chunk = file_obj.read(1024 ** 2) if not chunk: break hash_func.update(chunk)