Closed john916zhang closed 7 years ago
@anderson916 当前目录下有生成二维码吗? python有权限在本目录写入二维码吗?
生成了二维码。
@anderson916 你是使用的什么程序运行该项目? 如果使用命令行是否可以打开该文件?
xdg-open QR.jpg
➜ ~ ./wx.py
Getting uuid of QR code.
Downloading QR code.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/run-mailcap line 528.
Error: no "view" mailcap rules found for type "image/jpeg"
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 771: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'QR.jpg'
Please scan the QR code to log in.
@anderson916 你试试这个选项 先装上pillow
pip install pillow
然后改成一下auto_login
命令
itchat.auto_login(enableCmdQR=True)
可以了。谢谢。
请问这种情况,是我少了什么东西没装吗?@littlecodersh
I think you have to install xdg-utils before the it can try to open it. The command line is another way.
for centos: yum install xdg-utils
➜ ~ python wx.py Getting uuid of QR code. Downloading QR code.