From 2afc8dd0db27763616da2b1560c9e2d12370ea66 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Sun, 19 Dec 2021 11:10:10 +0000 Subject: [PATCH] fix win --- ppocr/data/imaug/label_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/data/imaug/label_ops.py b/ppocr/data/imaug/label_ops.py index 344f596d..58d06fd4 100644 --- a/ppocr/data/imaug/label_ops.py +++ b/ppocr/data/imaug/label_ops.py @@ -291,7 +291,7 @@ class KieLabelEncode(object): def __init__(self, character_dict_path, norm=10, directed=False, **kwargs): super(KieLabelEncode, self).__init__() self.dict = dict({'': 0}) - with open(character_dict_path, 'r') as fr: + with open(character_dict_path, 'r', encoding='utf-8') as fr: idx = 1 for line in fr: char = line.strip() -- GitLab