Coder Social home page Coder Social logo

Comments (5)

leiqin avatar leiqin commented on August 28, 2024 5

我在本机没有遇到这个问题,但是在 centos7 的 docker 中遇到相同的问题,我用这个命令解决了它
cat /etc/ssl/certs/ca-bundle.crt >>$(python -c 'import requests; print requests.certs.where()')

from wechat-python-sdk.

mynameischaos avatar mynameischaos commented on August 28, 2024

简单解决办法:代码中相应位置的 requests.request() 其中添加参数 verify=False; 意思是不验证;
也就是requests.request(... , verify=False)

from wechat-python-sdk.

fengdy avatar fengdy commented on August 28, 2024

在调用sdk自带的发送模板消息时, 也报类似错误,bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],) 这如何解决

from wechat-python-sdk.

mynameischaos avatar mynameischaos commented on August 28, 2024

直接找到sdk的代码修改即可呀~ /usr/local/lib/python2.7/dist-packages/wechat_sdk/lib/request.py
中 def request(self, method, url, access_token=None,verify=False, **kwargs) ; requests.request(添加参数verify=verify) self.request(verify=False); 所有python 的request中都加这个参数即可

from wechat-python-sdk.

linmounong avatar linmounong commented on August 28, 2024

verify=False就是自废武功啊……
我遇到过类似问题,可能是缺少一些库。如果你使用flask,可以根据这几个关键词找找原因

  • pyopenssl
  • snimissingwarning

from wechat-python-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.