add utf8 encoding for opening file

This commit is contained in:
svlandeg 2020-10-09 16:03:14 +02:00
parent 040c7c0541
commit e972ecba72

View File

@ -253,7 +253,7 @@ def _get_converter(msg, converter, input_path):
if converter == "auto": if converter == "auto":
converter = input_path.suffix[1:] converter = input_path.suffix[1:]
if converter == "ner" or converter == "iob": if converter == "ner" or converter == "iob":
with input_path.open() as file_: with input_path.open(encoding="utf8") as file_:
input_data = file_.read() input_data = file_.read()
converter_autodetect = autodetect_ner_format(input_data) converter_autodetect = autodetect_ner_format(input_data)
if converter_autodetect == "ner": if converter_autodetect == "ner":