V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
pyengwoei
V2EX  ›  Python

请问同样的程序在使用 session.get(self.url) Ubuntu 下面正常 去 Windows 2008 跑就出现证书问题( ssl.c:590)

  •  
  •   pyengwoei · 2016-09-30 10:39:02 +08:00 · 1900 次点击
    这是一个创建于 2771 天前的主题,其中的信息可能已经有所发展或是发生改变。
    self.resp = self.session.get(self.url)
    File "D:\baccarat2\vendor\requests\sessions.py", line 487, in get
    return self.request('GET', url, **kwargs)
    File "D:\baccarat2\vendor\requests\sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
    File "D:\baccarat2\vendor\requests\sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
    File "D:\baccarat2\vendor\requests\adapters.py", line 477, in send
    raise SSLError(e, request=request)
    requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
    y failed (_ssl.c:590)
    6 条回复    2016-09-30 11:40:32 +08:00
    pyengwoei
        1
    pyengwoei  
    OP
       2016-09-30 10:50:45 +08:00
    我感觉好像是证书的问题
    pyengwoei
        3
    pyengwoei  
    OP
       2016-09-30 11:16:30 +08:00
    @wevsty 本来在 Windows 下面 前两天都还可以的,今天启动就不行了
    wevsty
        4
    wevsty  
       2016-09-30 11:24:20 +08:00
    @pyengwoei 访问 URL 的证书是否异常?你这个提升就是校验证书失败。检查一下 URL 使用的证书是否正确,是否受到系统信任
    pyengwoei
        5
    pyengwoei  
    OP
       2016-09-30 11:27:53 +08:00
    @wevsty URL 使用的证书 这个是已经下载到工程目录里面了吗,我没找到有证书文件
    9hills
        6
    9hills  
       2016-09-30 11:40:32 +08:00
    verify=False 忽略证书吧
    @pyengwoei 在系统的证书目录里,你也可以手动加载
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1065 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:53 · PVG 01:53 · LAX 10:53 · JFK 13:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.