From 3d7f6214b5e698f877c5619eab835a9d03befd25 Mon Sep 17 00:00:00 2001 From: Kimmo Linna Date: Tue, 20 Aug 2024 18:14:51 +0300 Subject: [PATCH] file encoding to utf8 --- src/main/python/create_measurements.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/python/create_measurements.py b/src/main/python/create_measurements.py index 50230c844..ed0086949 100755 --- a/src/main/python/create_measurements.py +++ b/src/main/python/create_measurements.py @@ -42,7 +42,7 @@ def build_weather_station_name_list(): Grabs the weather station names from example data provided in repo and dedups """ station_names = [] - with open('../../../data/weather_stations.csv', 'r') as file: + with open('../../../data/weather_stations.csv', 'r',encoding="utf8") as file: file_contents = file.read() for station in file_contents.splitlines(): if "#" in station: @@ -111,7 +111,7 @@ def build_test_data(weather_station_names, num_rows_to_create): print('Building test data...') try: - with open("../../../data/measurements.txt", 'w') as file: + with open("../../../data/measurements.txt", 'w',encoding="utf8") as file: progress = 0 for chunk in range(chunks):