zoukankan      html  css  js  c++  java
  • (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))

    requests库提示警告:

     (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))


    但移除认证后控制台总是抛出警告:

     InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

      InsecureRequestWarning)

    根据提示路径https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings可找到方法一些解决办法,简单的办法可用移除警告:disable_warnings()

    code

    requests.packages.urllib3.disable_warnings()
    r = requests.post(service_url, data=payload, headers=self.headers,verify = False)

  • 相关阅读:
    mysql innodb ini
    innodb_flush_method
    mysql查询缓存
    查看表的索引
    mysql key PRI UNI MUL
    E160028
    mysql命令
    No identifier specified for entity
    在画图板中添加文本并更改文本颜色
    在Windows资源管理器中预览PowerShell文件
  • 原文地址:https://www.cnblogs.com/sea-stream/p/14210521.html
Copyright © 2011-2022 走看看