From 5ef5b8b65d02658a98ea6ff419ed90d3c3d29211 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 24 May 2022 11:45:24 +0300 Subject: [PATCH] Fix error when reading file on a non-utf-8 locale --- src/PythonAddons/macros/pipeNetwork/feature.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PythonAddons/macros/pipeNetwork/feature.py b/src/PythonAddons/macros/pipeNetwork/feature.py index a22632084..e857f7e48 100755 --- a/src/PythonAddons/macros/pipeNetwork/feature.py +++ b/src/PythonAddons/macros/pipeNetwork/feature.py @@ -696,7 +696,7 @@ Il est nommé conformément au noeud d'application. Cela n'a qu'un intérêt gra while True: # B.1. Lecture du fichier - with open(filepath) as afile: + with open(filepath, encoding='utf-8') as afile: summary = 0 method = self.parligne for line in afile: -- 2.39.2