chbrown / liwc-python

Linguistic Inquiry and Word Count (LIWC) analyzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use Traditional_Chinese_LIWC2015 UnicodeDecodeError

ysjhs70049 opened this issue · comments

import liwc
parse, category_names = liwc.load_token_parser('/Downloads/Traditional_Chinese_LIWC2015_Dictionary.dic')

Traceback (most recent call last):
File "C:/Users/Desktop/test.py", line 4, in
parse, category_names = liwc.load_token_parser('/Downloads/Traditional_Chinese_LIWC2015_Dictionary.dic')
File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\liwc_init_.py", line 21, in load_token_parser
lexicon, category_names = read_dic(filepath)
File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\liwc\dic.py", line 38, in read_dic
for line in lines:

UnicodeDecodeError: 'cp950' codec can't decode byte 0xbf in position 2: illegal multibyte sequence

What can I do to solve this problem?