From df8c6a7084b30f501c2132e5dc92303cfe17d864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Gim=C3=A9nez?= Date: Sat, 8 Aug 2020 19:17:24 -0300 Subject: [PATCH] fix charts --- modules/logs/endpoints.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/logs/endpoints.py b/modules/logs/endpoints.py index a740974..d787ea9 100644 --- a/modules/logs/endpoints.py +++ b/modules/logs/endpoints.py @@ -41,7 +41,7 @@ class LogView(FlaskView): if not os.path.isfile(filename): return ('File not found', 404) array = [] - with open(filename, 'rb', encoding='utf-8') as csv_file: + with open(filename, 'r', encoding='utf-8') as csv_file: reader = csv.reader(csv_file) for row in reader: try: @@ -85,7 +85,7 @@ class LogView(FlaskView): return ('File not found', 404) array = [] - with open(filename, 'rb', encoding='utf-8') as csv_file: + with open(filename, 'r', encoding='utf-8') as csv_file: reader = csv.reader(csv_file) for row in reader: try: @@ -114,7 +114,7 @@ class LogView(FlaskView): chart_data["data_id"]) } - @route('//', methods=["POST"]) + @route('//', methods=["POST"]) def get_logs_as_json(self, log_type, log_id): """ :param log_type: log type