fix: 'cp949' codec can't decode byte 0xec in position 16: illegal multibyte sequence

#1
Files changed (1) hide show
  1. kmhas_korean_hate_speech.py +1 -1
kmhas_korean_hate_speech.py CHANGED
@@ -100,7 +100,7 @@ class Kmhas(datasets.GeneratorBasedBuilder):
100
  def _generate_examples(self, filepath):
101
  """Generate K-MHaS Korean Multi-label Hate Speech examples"""
102
 
103
- with open(filepath, 'r') as f:
104
  lines = f.readlines()[1:]
105
 
106
  for index, line in enumerate(lines):
 
100
  def _generate_examples(self, filepath):
101
  """Generate K-MHaS Korean Multi-label Hate Speech examples"""
102
 
103
+ with open(filepath, 'r', encoding='utf-8') as f:
104
  lines = f.readlines()[1:]
105
 
106
  for index, line in enumerate(lines):