Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 0aedd05

Browse files
committed
Fixed UnicodeDecodeError (Windows).
1 parent 4e0c9e3 commit 0aedd05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

farm/data_handler/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def read_jsonl(file, proxies=None):
116116
if not (os.path.exists(file)):
117117
logger.info(f" Couldn't find {file} locally. Trying to download ...")
118118
_download_extract_downstream_data(file, proxies=proxies)
119-
dicts = [json.loads(l) for l in open(file)]
119+
dicts = [json.loads(l) for l in open(file, encoding="utf-8")]
120120
return dicts
121121

122122
def read_ner_file(filename, sep="\t", proxies=None):

0 commit comments

Comments
 (0)