博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
关于wxpy,使用Python玩转微信的问题
阅读量:5321 次
发布时间:2019-06-14

本文共 2526 字,大约阅读时间需要 8 分钟。

在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

你可能感兴趣的文章
通过Python、BeautifulSoup爬取Gitee热门开源项目
查看>>
正则表达式的用法
查看>>
线程安全问题
查看>>
集合的内置方法
查看>>
IOS Layer的使用
查看>>
Android SurfaceView实战 带你玩转flabby bird (上)
查看>>
Android中使用Handler造成内存泄露的分析和解决
查看>>
android代码控制seekbar的样式
查看>>
servlet
查看>>
SSM集成activiti6.0错误集锦(一)
查看>>
linux下安装python环境
查看>>
pdnovel 看书 读书 听书
查看>>
oracle for loop 代替cursor (转载)
查看>>
Linked List Cycle II
查看>>
工作踩坑记录:JavaScript跳转被缓存
查看>>
个人作业
查看>>
下拉刷新
查看>>
display:inline-block 和float:left 的区别
查看>>
java 图片与文字生成PDF
查看>>
通道(Channel)的原理获取
查看>>