fix/force to assign utf-8

This commit is contained in:
SouthFox 2022-12-31 10:55:11 +08:00
parent 70c3705319
commit a5f10aaca1

View file

@ -78,7 +78,8 @@ def analysis():
wordlist = jieba.lcut(toots_content)
space_list = ' '.join(wordlist)
stopwords = set()
content = [line.strip() for line in open('misc/stopwords.txt','r').readlines()]
content = [line.strip() for line in open('misc/stopwords.txt','r',
encoding='utf-8').readlines()]
stopwords.update(content)
wc = WordCloud(width=1400, height=2200,