关于wxpy,使用Python玩转微信的问题

在github上下载了,安装了之后在idle上运行,好像是说Python不能上网。新手求助。 现在问题已经解决,是ssl 证书的问题,不能用最新的
复制内容到剪贴板
代码:
sudo pip uninstall -y certifi

sudo pip install certifi==2015.04.28
>>> bot=Bot()
Traceback (most recent call last):
  File "D:\Python34\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "D:\Python34\lib\site-packages\urllib3\connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "D:\Python34\lib\site-packages\urllib3\connectionpool.py", line 844, in _validate_conn
    conn.connect()
  File "D:\Python34\lib\site-packages\urllib3\connection.py", line 326, in connect
    ssl_context=context)
  File "D:\Python34\lib\site-packages\urllib3\util\ssl_.py", line 325, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python34\lib\ssl.py", line 365, in wrap_socket
    _context=self)
  File "D:\Python34\lib\ssl.py", line 583, in __init__
    self.do_handshake()
  File "D:\Python34\lib\ssl.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:\Python34\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "D:\Python34\lib\site-packages\urllib3\connectionpool.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:\Python34\lib\site-packages\itchat\utils.py", line 124, in test_connect
    r = requests.get(config.BASE_URL)
  File "D:\Python34\lib\site-packages\requests\api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "D:\Python34\lib\site-packages\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "D:\Python34\lib\site-packages\requests\sessions.py", line 502, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\Python34\lib\site-packages\requests\sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python34\lib\site-packages\requests\adapters.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.

 

转载于:https://www.cnblogs.com/Devopser/p/7298758.html

你可能感兴趣的:(关于wxpy,使用Python玩转微信的问题)