From 422e64eccbe3c468e11c2bfff948da4e875f93ca Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:35:08 +0200 Subject: [PATCH] fix venv encoding on windows (an potentially other systems) --- nostr_dvm/dvm.py | 2 +- nostr_dvm/interfaces/dvmtaskinterface.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nostr_dvm/dvm.py b/nostr_dvm/dvm.py index 01c4d15..49a7bb1 100644 --- a/nostr_dvm/dvm.py +++ b/nostr_dvm/dvm.py @@ -672,7 +672,7 @@ async def do_work(job_event, amount): await run_subprocess(python_bin, dvm_config, request_form) print("Finished processing, loading data..") - with open(os.path.abspath('output.txt')) as f: + with open(os.path.abspath('output.txt'), encoding="utf-8") as f: resultall = f.readlines() for line in resultall: if line != '\n': diff --git a/nostr_dvm/interfaces/dvmtaskinterface.py b/nostr_dvm/interfaces/dvmtaskinterface.py index bc36330..5674889 100644 --- a/nostr_dvm/interfaces/dvmtaskinterface.py +++ b/nostr_dvm/interfaces/dvmtaskinterface.py @@ -158,7 +158,7 @@ def process_args(): @staticmethod def write_output(result, output): - with open(os.path.abspath(output), 'w') as f: + with open(os.path.abspath(output), 'w', encoding="utf8") as f: f.write(result) # f.close() diff --git a/setup.py b/setup.py index 22781c2..7f113e3 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = '0.6.22' +VERSION = '0.6.23' DESCRIPTION = 'A framework to build and run Nostr NIP90 Data Vending Machines' LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information')