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 0xf2 in position 18: invalid continuation byte #5

Closed
Hanmii opened this issue Dec 16, 2020 · 5 comments

Comments

@Hanmii
Copy link

Hanmii commented Dec 16, 2020

hello, when i load the word embedding , there is an error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf2 in position 18: invalid continuation byte

can u help me?

@jind11
Copy link
Owner

jind11 commented Dec 17, 2020

Could you let me know which line is causing this error and what is your python version?

@Hanmii
Copy link
Author

Hanmii commented Dec 17, 2020

Line 328 in /lstm_model/data_utils.py /, and the python version is 3.6.
Thanks!

@jind11
Copy link
Owner

jind11 commented Dec 17, 2020

I suggest two solutions: 1. I used python 2.7 when writing this code, so could you try changing to python 2.7; 2. You can try changing "r" to "rb" in line 326 and 327. Let me know if you have solved the issue.

@Hanmii
Copy link
Author

Hanmii commented Dec 18, 2020

Thanks for your answers and I have solved this issue by changing the python version to 2.7 ! Thanks!!

@jind11
Copy link
Owner

jind11 commented Dec 18, 2020

Good to know! Since this issue is solved, I am going to close it.

@jind11 jind11 closed this as completed Dec 18, 2020
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

2 participants