美文网首页
self signed certificate in certi

self signed certificate in certi

作者: Ivanlfli | 来源:发表于2022-08-28 21:15 被阅读0次

    python报错:self signed certificate in certificate chain (_ssl.c:1131)
    解决:代码里加入下面代码

    import ssl
    
    try:
        _create_unverified_https_context = ssl._create_unverified_context
    except AttributeError:
        # Legacy Python that doesn't verify HTTPS certificates by default
        pass
    else:
        # Handle target environment that doesn't support HTTPS verification
        ssl._create_default_https_context = _create_unverified_https_context
    

    相关文章

      网友评论

          本文标题:self signed certificate in certi

          本文链接:https://www.haomeiwen.com/subject/xfvcnrtx.html