wxBot icon indicating copy to clipboard operation
wxBot copied to clipboard

python test.py 问题

Open guoxinrun opened this issue 6 years ago • 5 comments

[info] start to process message 之后半小时就没往下走了,是什么原因

guoxinrun avatar Jan 31 '19 02:01 guoxinrun

这是什么问题? [INFO] Please use WeChat to scan the QR code . [INFO] Please confirm to login . [ERROR] Web WeChat run failed --> 'ascii' codec can't encode characters in position 31-57: ordinal not in range(128)

suyu2015 avatar Feb 21 '19 05:02 suyu2015

这是什么问题? [INFO]请使用微信扫描二维码。 [INFO]请确认登录。 [错误] Web WeChat运行失败 - >'ascii'编解码器无法编码位置31-57中的字符:序号不在范围内(128)

字符编码问题,可以在/usr/lib/python2.7/site-packages文件夹下新建一个sitecustomize.py,内容为

# encoding=utf8  
import sys  
  
reload(sys)  
sys.setdefaultencoding('utf8')

然后再次运行python test.py就可以解决此问题

zhaopengvicki avatar Apr 02 '19 05:04 zhaopengvicki

问题解决了,不是这个原因,是新申请的微信号,不支持WEB版的

[email protected]

发件人: ZhaoPeng 发送时间: 2019-04-02 13:33 收件人: liuwons/wxBot 抄送: suyu2015; Comment 主题: Re: [liuwons/wxBot] python test.py 问题 (#309) 这是什么问题? [INFO]请使用微信扫描二维码。 [INFO]请确认登录。 [错误] Web WeChat运行失败 - >'ascii'编解码器无法编码位置31-57中的字符:序号不在范围内(128) 字符编码问题,可以在/usr/lib/python2.7/site-packages文件夹下新建一个sitecustomize.py,内容为

encoding=utf8

import sys

reload(sys)
sys.setdefaultencoding('utf8')

然后再次运行python test.py就可以解决此问题 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

suyu2015 avatar Apr 02 '19 06:04 suyu2015

这是什么问题? [INFO]请使用微信扫描二维码。 [INFO]请确认登录。 [错误] Web WeChat运行失败 - >'ascii'编解码器无法编码位置31-57中的字符:序号不在范围内(128)

字符编码问题,可以在/usr/lib/python2.7/site-packages文件夹下新建一个sitecustomize.py,内容为

# encoding=utf8  
import sys  
  
reload(sys)  
sys.setdefaultencoding('utf8')

然后再次运行python test.py就可以解决此问题

到 /usr/lib/python2.7 目录下,新建 sitecustomize.py 失败, 权限问题 image 这个请问需要怎么处理?

sggmico avatar Nov 29 '19 08:11 sggmico