zoukankan      html  css  js  c++  java
  • 关于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: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.

     
  • 相关阅读:
    Android开发(三十二)——延时
    Android开发(三十一)——重复引用包错误Conversion to Dalvik format failed
    Android开发(二十九)——layout_weight的含义
    Android开发(二十八)——基础功能函数
    Android开发(二十七)——android:layout_weight的真实含义
    Android开发(二十六)——Application
    Android开发(二十五)——Android上传文件至七牛
    ansible
    H3C 交换机VRRP和堆叠
    Centos 7.x 双网卡绑定
  • 原文地址:https://www.cnblogs.com/Devopser/p/7298758.html
Copyright © 2011-2022 走看看