Closed piyoketa closed 9 months ago
from datasets import load_dataset dataset = load_dataset("llm-book/livedoor-news-corpus")
を実行すると以下のエラーが発生します
File ~\.cache\huggingface\modules\datasets_modules\datasets\llm-book--livedoor-news-corpus\xxxx\livedoor-news-corpus.py:91 in (.0) 89 continue 90 with open(file_name, "r") as f: ---> 91 d = [line.strip() for line in f] 92 data.append( 93 { 94 "url": d[0], (...) 99 } 100 ) 102 if self.config.shuffle == True: UnicodeDecodeError: 'cp932' codec can't decode byte 0x83 in position 96: illegal multibyte sequence
livedoor-news-corpus.pyの90行目を下記に修正したところ、解決しました
with open(file_name, "r", encoding="utf-8") as f:
問題の共有と解決法の提案ありがとうございます。 反映いたしました。
発生した問題
を実行すると以下のエラーが発生します
解決法
livedoor-news-corpus.pyの90行目を下記に修正したところ、解決しました
with open(file_name, "r", encoding="utf-8") as f: