Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte #17

Open
shawnwang95 opened this issue Jul 23, 2018 · 0 comments

Comments

@shawnwang95
Copy link

Prefix dict has been built succesfully.
Traceback (most recent call last):
File "predict.py", line 23, in
lstm_predict(sentence)
File "code/Sentiment_lstm.py", line 187, in lstm_predict
data=input_transform(string)
File "code/Sentiment_lstm.py", line 173, in input_transform
model=gensim.models.Word2Vec.load_word2vec_format('lstm_data/Word2vec_model.pkl', binary = True, unicode_errors='ignore')
File "/anaconda3/lib/python3.6/site-packages/gensim/models/word2vec.py", line 1172, in load_word2vec_format
header = utils.to_unicode(fin.readline(), encoding=encoding)
File "/anaconda3/lib/python3.6/site-packages/gensim/utils.py", line 217, in any2unicode
return unicode(text, encoding, errors=errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

Tried "model=gensim.models.Word2Vec.load_word2vec_format('lstm_data/Word2vec_model.pkl', unicode_errors='ignore')", still same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant