在github上下载了,安装了之后在idle上运行,好像是说Python不能上网。新手求助。现在问题已经解决,是ssl 证书的问题,不能用最新的
Traceback (most recent call last):
File "D:Python34libsite-packagesurllib3connectionpool.py", line 600, in urlopen
chunked=chunked)
File "D:Python34libsite-packagesurllib3connectionpool.py", line 345, in _make_request
self._validate_conn(conn)
File "D:Python34libsite-packagesurllib3connectionpool.py", line 844, in _validate_conn
conn.connect()
File "D:Python34libsite-packagesurllib3connection.py", line 326, in connect
ssl_context=context)
File "D:Python34libsite-packagesurllib3utilssl_.py", line 325, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "D:Python34libssl.py", line 365, in wrap_socket
_context=self)
File "D:Python34libssl.py", line 583, in __init__
self.do_handshake()
File "D:Python34libssl.py", line 810, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:Python34libsite-packages equestsadapters.py", line 440, in send
timeout=timeout
File "D:Python34libsite-packagesurllib3connectionpool.py", line 630, in urlopen
raise SSLError(e)
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:Python34libsite-packagesitchatutils.py", line 124, in test_connect
r = requests.get(config.BASE_URL)
File "D:Python34libsite-packages equestsapi.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "D:Python34libsite-packages equestsapi.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "D:Python34libsite-packages equestssessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "D:Python34libsite-packages equestssessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "D:Python34libsite-packages equestsadapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
You can't get access to internet or wechat domain, so exit.
复制内容到剪贴板
>>> bot=Bot()代码:
sudo pip uninstall -y certifi
sudo pip install certifi==2015.04.28
Traceback (most recent call last):
File "D:Python34libsite-packagesurllib3connectionpool.py", line 600, in urlopen
chunked=chunked)
File "D:Python34libsite-packagesurllib3connectionpool.py", line 345, in _make_request
self._validate_conn(conn)
File "D:Python34libsite-packagesurllib3connectionpool.py", line 844, in _validate_conn
conn.connect()
File "D:Python34libsite-packagesurllib3connection.py", line 326, in connect
ssl_context=context)
File "D:Python34libsite-packagesurllib3utilssl_.py", line 325, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "D:Python34libssl.py", line 365, in wrap_socket
_context=self)
File "D:Python34libssl.py", line 583, in __init__
self.do_handshake()
File "D:Python34libssl.py", line 810, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:Python34libsite-packages equestsadapters.py", line 440, in send
timeout=timeout
File "D:Python34libsite-packagesurllib3connectionpool.py", line 630, in urlopen
raise SSLError(e)
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:Python34libsite-packagesitchatutils.py", line 124, in test_connect
r = requests.get(config.BASE_URL)
File "D:Python34libsite-packages equestsapi.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "D:Python34libsite-packages equestsapi.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "D:Python34libsite-packages equestssessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "D:Python34libsite-packages equestssessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "D:Python34libsite-packages equestsadapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
You can't get access to internet or wechat domain, so exit.