我正在使用tweetminer收集此网站的推文: https://github.com/kshaffer/tweetmineR
但是当我使用twitter琰u search.py运行搜索时 我得到这些错误:
<undefined>
'charmap' codec can't encode character '\u06cc' in position 196: character maps to <undefined>
'charmap' codec can't encode character '\U0001f43c' in position 88: character maps to <undefined>
'charmap' codec can't encode character '\u06cc' in position 210: character maps to <undefined>
它们并不完全是错误,但搜索仍将继续。但是控制台上有很多照片。如何解决
每次使用
open()
(第41行和第48行)时,可以尝试添加参数encoding='utf-8'
。或者将.encode('utf-8')
应用于你收集的tweet相关问题 更多 >
编程相关推荐