-
Notifications
You must be signed in to change notification settings - Fork 94
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
python2.7环境下中文微信昵称或者群组报编码错误 #10
Comments
方便提供下操作系统版本嘛? |
@bluedazzle win10企业版 |
请问问题解决了吗。好像也碰到了这个问题 |
看起来是 wxpy Windows 下编码的问题,会尽快修复。到时候可能需要重新安装 wxpy 库 |
Change-Id: I604187427d1084771fb1f4187fb25fce36dbff35
刚才研究了下 导致最后返回的map结果出错。 我暂时的解决办法是 from wxpy.compatible import PY2 def main():
|
嗯嗯,Windows 下系统编码不是 utf-8 所以 future.builtins 的 str 会出错。你可以先那样解决,我在 wxpy develop 分支修复了这个问题。你可以安装这个分支的 wxpy 试试 @leemon9527 |
@bluedazzle 刚才重新安装了wxpy的develop分支,好像还会报错 |
ok,我再看看 |
group = bot.groups().search(u'游否')[0] '游否' 前面 加一个 u --> u'游否' 解决了 |
Traceback (most recent call last): |
@bluedazzle 该怎么解决? |
我下载的最新版 |
@JustDoItQz 不要把你的文件名命名为 wechat_sender.py 换个名字 |
group = bot.groups().search('游否')[0]
File "C:\Python27\lib\site-packages\wxpy\api\chats\groups.py", line 71, in search
return Groups(filter(match, self))
File "C:\Python27\lib\site-packages\wxpy\api\chats\groups.py", line 61, in match
if not match_name(group, keywords):
File "C:\Python27\lib\site-packages\wxpy\utils\misc.py", line 185, in match_name
if kw in str(getattr(chat, attr, '')).lower():
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe6 in position 0: unexpected end of data
The text was updated successfully, but these errors were encountered: