-
Notifications
You must be signed in to change notification settings - Fork 72
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
windows下使用有编码问题 #7
Comments
同有问题 |
同 |
在源码的第41行, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Traceback (most recent call last): File "D:/projects/miscellaneous/test.py", line 5, in <module> ws_tool = WordSimilarity2010() File "C:\Users\00015426\AppData\Local\Programs\Python\Python37\lib\site-packages\word_similarity\__init__.py", line 101, in __init__ super(WordSimilarity2010, self).__init__() File "C:\Users\00015426\AppData\Local\Programs\Python\Python37\lib\site-packages\word_similarity\__init__.py", line 20, in __init__ self._load_cilin(t_cilin_path) File "C:\Users\00015426\AppData\Local\Programs\Python\Python37\lib\site-packages\word_similarity\__init__.py", line 45, in _load_cilin line = file_obj.readline() UnicodeDecodeError: 'gbk' codec can't decode byte 0xba in position 11: illegal multibyte sequence
希望作者可以增加编码兼容,比如说
file_obj = open(file_path, 'r', encoding="utf-8")
The text was updated successfully, but these errors were encountered: