From: vsr Date: Tue, 24 May 2022 08:45:24 +0000 (+0300) Subject: Fix error when reading file on a non-utf-8 locale X-Git-Tag: V9_9_1b1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5ef5b8b65d02658a98ea6ff419ed90d3c3d29211;p=modules%2Fshaper.git Fix error when reading file on a non-utf-8 locale --- 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: