From 4c3951dd8e68b5472bdbb79f67aaf37313839f09 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Fri, 4 Nov 2022 10:21:51 +0100 Subject: [PATCH] fixed problem with encoding utf8 --- Sonnendach.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sonnendach.py b/Sonnendach.py index 00b5173..86b1659 100644 --- a/Sonnendach.py +++ b/Sonnendach.py @@ -157,7 +157,7 @@ def search_adresses(adress_list, filename_adresslist, driver, mainText): adress[columnIndexes[10]] = pv_Production75 adress[columnIndexes[11]] = pv_Production100 adress[columnIndexes[12]] = value_electricity_production - adress_file = open(filename_adresslist, "w") + adress_file = open(filename_adresslist, "w", encoding="utf-8") new_line_string = "" for j in adress: new_line_string = new_line_string + j + file_split_char @@ -182,7 +182,7 @@ def search_adresses(adress_list, filename_adresslist, driver, mainText): def read_adresslist(filename_adresslist): returnvalues = [] try: - adress_file = open(filename_adresslist, "r") + adress_file = open(filename_adresslist, "r", encoding="utf-8") adress_list = adress_file.read().splitlines() adress_file.close() returnvalues.append(True)