|
发表于 2018-11-9 14:18:29
|
显示全部楼层
我用了楼主的代码,出现下面的错误,能不能请楼主指点下,如何修改?
======================= RESTART: E:\StudyPython\zz.py =======================
█
Getting uuid of QR code.
Downloading QR code.
Please scan the QR code to log in.
Please press confirm on your phone.
Traceback (most recent call last):
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
chunked=chunked)
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
conn.connect()
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connection.py", line 344, in connect
ssl_context=context)
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\util\ssl_.py", line 344, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "D:\Programs\Python\Python36\lib\ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "D:\Programs\Python\Python36\lib\ssl.py", line 814, in __init__
self.do_handshake()
File "D:\Programs\Python\Python36\lib\ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "D:\Programs\Python\Python36\lib\ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 667, in urlopen
**response_kw)
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 667, in urlopen
**response_kw)
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 667, in urlopen
**response_kw)
[Previous line repeated 26 more times]
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "D:\Programs\Python\Python36\lib\site-packages\urllib3\util\retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=AwpkAmb_UWQm0DKLGEm2HgQe@qrticket_0&uuid=wdASIjosCA==&lang=zh_CN&scan=1541744222 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\StudyPython\zz.py", line 7, in <module>
bot = Bot()
File "D:\Programs\Python\Python36\lib\site-packages\wxpy\api\bot.py", line 86, in __init__
loginCallback=login_callback, exitCallback=logout_callback
File "D:\Programs\Python\Python36\lib\site-packages\itchat\components\register.py", line 35, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File "D:\Programs\Python\Python36\lib\site-packages\itchat\components\login.py", line 48, in login
status = self.check_login()
File "D:\Programs\Python\Python36\lib\site-packages\itchat\components\login.py", line 131, in check_login
process_login_info(self, r.text)
File "D:\Programs\Python\Python36\lib\site-packages\itchat\components\login.py", line 147, in process_login_info
r = core.s.get(core.loginInfo['url'], headers=headers, allow_redirects=False)
File "D:\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "D:\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "D:\Programs\Python\Python36\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "D:\Programs\Python\Python36\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=AwpkAmb_UWQm0DKLGEm2HgQe@qrticket_0&uuid=wdASIjosCA==&lang=zh_CN&scan=1541744222 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),))
>>> |
|