diff --git a/BDSM/commands.py b/BDSM/commands.py index f18899a..6be5677 100644 --- a/BDSM/commands.py +++ b/BDSM/commands.py @@ -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,