From 09412a71bdaaf30192fd897714f2d722d9755327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20G=C3=B3mez=20Mac=C3=ADas?= Date: Fri, 21 Feb 2025 11:29:10 +0100 Subject: [PATCH] fix: Encoding error in upload files example closes #208 --- examples/upload_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/upload_files.py b/examples/upload_files.py index 6cc4cb3..5a7efcc 100644 --- a/examples/upload_files.py +++ b/examples/upload_files.py @@ -43,7 +43,7 @@ async def upload_hashes(queue, apikey): async with vt.Client(apikey) as client: while not queue.empty(): file_path = await queue.get() - with open(file_path, encoding="utf-8") as f: + with open(file_path, 'rb') as f: analysis = await client.scan_file_async(file=f) print(f"File {file_path} uploaded.") queue.task_done()