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
sbmzhcn
V2EX  ›  Python

碰下运气,看有人能把这个问题解决吗?

  •  
  •   sbmzhcn · 2016-12-13 15:30:27 +08:00 · 1730 次点击
    这是一个创建于 2691 天前的主题,其中的信息可能已经有所发展或是发生改变。
    credentials = ServiceAccountCredentials.from_p12_keyfile(
            SERVICE_ACCOUNT_EMAIL, KEY_FILE_LOCATION, scopes=SCOPES)
    
    # 设置代理 Goproxy 127.0.0.1 8087
    socks.setdefaultproxy(socks.PROXY_TYPE_HTTP, proxy_host, proxy_port)
    socks.wrapmodule( httplib2)
    
    http = credentials.authorize( httplib2.Http(timeout=35))
    
    analytics = build('analytics', 'v4', http=http,
                          discoveryServiceUrl=DISCOVERY_URI)
    
    

    goproxy会有错误,因为证书的原因。

    ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

    有人遇到过类似问题没,怎么解决?

    1 条回复    2016-12-13 15:33:42 +08:00
    sbmzhcn
        1
    sbmzhcn  
    OP
       2016-12-13 15:33:42 +08:00
    顺便说下:
    disable_ssl_certificate_validation=True 没任何作用的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2828 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 02:57 · PVG 10:57 · LAX 19:57 · JFK 22:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.