Skip to content
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

python test.py 问题 #309

Open
guoxinrun opened this issue Jan 31, 2019 · 5 comments
Open

python test.py 问题 #309

guoxinrun opened this issue Jan 31, 2019 · 5 comments

Comments

@guoxinrun
Copy link

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

@suyu2015
Copy link

这是什么问题?
[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)

@zhaopengvicki
Copy link

这是什么问题?
[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就可以解决此问题

@suyu2015
Copy link

suyu2015 commented Apr 2, 2019 via email

@sggmico
Copy link

sggmico commented Nov 29, 2019

这是什么问题?
[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
这个请问需要怎么处理?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@sggmico @suyu2015 @zhaopengvicki @guoxinrun and others