From e53590da4bba429df5934c3b3ff1b45645b98d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20G=C3=B3mez=20Mac=C3=ADas?= Date: Fri, 21 Feb 2025 12:08:59 +0100 Subject: [PATCH] fix: Encoding error in upload files example (#209) --- .github/workflows/testing.yaml | 4 ++-- examples/upload_files.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 088d47b..efef044 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -5,10 +5,10 @@ on: [push] jobs: build: - runs-on: ubuntu-latest + runs-on: 'ubuntu-latest' strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v3 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()