推荐学习书目
› 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 · Dec 13, 2016 · 2419 views
    This topic created in 3580 days ago, the information mentioned may be changed or developed.
    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 replies  •  2016-12-13 15:33:42 +08:00
    sbmzhcn
        1
    sbmzhcn  
    OP
       Dec 13, 2016
    顺便说下:
    disable_ssl_certificate_validation=True 没任何作用的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2236 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 05:30 · PVG 13:30 · LAX 22:30 · JFK 01:30
    ♥ Do have faith in what you're doing.