ryo0634 commited on
Commit
92538dc
1 Parent(s): 99f0c1f

set the default encoding to utf-8

Browse files
Files changed (1) hide show
  1. aio-retriever.py +1 -1
aio-retriever.py CHANGED
@@ -69,7 +69,7 @@ class AioRetriever(datasets.GeneratorBasedBuilder):
69
  return split_generators
70
 
71
  def _generate_examples(self, filepath: str) -> Iterator[Tuple[int, Dict[str, Any]]]:
72
- with open(filepath) as f:
73
  for i, line in enumerate(f):
74
  item = json.loads(line)
75
  yield i, item
 
69
  return split_generators
70
 
71
  def _generate_examples(self, filepath: str) -> Iterator[Tuple[int, Dict[str, Any]]]:
72
+ with open(filepath, encoding="utf-8") as f:
73
  for i, line in enumerate(f):
74
  item = json.loads(line)
75
  yield i, item