diff --git a/python/fasttext_module/fasttext/tests/test_script.py b/python/fasttext_module/fasttext/tests/test_script.py index a41515ad0..72075920e 100644 --- a/python/fasttext_module/fasttext/tests/test_script.py +++ b/python/fasttext_module/fasttext/tests/test_script.py @@ -206,7 +206,7 @@ def check(data): model = train_supervised(input=tmpf.name, **kwargs) true_labels = [] all_words = [] - with open(tmpf2.name, 'r') as fid: + with open(tmpf2.name, 'r', encoding="UTF-8") as fid: for line in fid: if sys.version_info < (3, 0): line = line.decode("UTF-8")