Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1179

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 0: unexpected end of data

$
0
0

I am using FastText.load_fasttext_format()to load fastText Official Japanese trained model (300 dim) in Google Colab.

Here is my code.

model_path = "/content/drive/MyDrive/IDR/rakuten/wikipedia_fastText/cc.ja.300.bin"model = FastText.load_fasttext_format(model_path)

And here is the encoding error.

---------------------------------------------------------------------------UnicodeDecodeError                        Traceback (most recent call last)<ipython-input-7-61d7c85f09b2> in <module>()      2       3 model_path = "/content/drive/MyDrive/IDR/rakuten/wikipedia_fastText/cc.ja.300.bin"----> 4 model = FastText.load_fasttext_format(model_path)2 frames/usr/local/lib/python3.7/dist-packages/gensim/models/fasttext.py in _load_dict(self, file_handle, encoding)    818                 word_bytes += char_byte    819                 char_byte = file_handle.read(1)--> 820             word = word_bytes.decode(encoding)    821             count, _ = self.struct_unpack(file_handle, '@qb')    822 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 0: unexpected end of data

Viewing all articles
Browse latest Browse all 1179

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>