From 077df73003854ebd30872dde84b5743c9802d7b3 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 25 Jan 2023 14:44:01 +0200 Subject: [PATCH] encode utf8 --- find_duplicate_files/find_duplicate_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/find_duplicate_files/find_duplicate_files.py b/find_duplicate_files/find_duplicate_files.py index 0837a13..537f657 100644 --- a/find_duplicate_files/find_duplicate_files.py +++ b/find_duplicate_files/find_duplicate_files.py @@ -48,7 +48,7 @@ class find_duplicate_files: hash = hashlib.sha256() with open(file.path, 'r') as file_pointer: file_content = file_pointer.read() - hash.update(file_content) + hash.update(file_content.encode('utf-8')) files[hash.hexdigest()] = file.path elif file.is_dir(follow_symlinks=False): more_files = self.recursive_scandir(