Python 日常报错总结

本章内容

 

 

 

requests模块报错

  执行:res = requests.post(api,mdata = post_data)

  报错:SSLError: EOF occurred in violation of protocol (_ssl.c:600)

  命令测试:

  

  显然ssl握手没有成功,

  查看openssl version 版本,不是最新的版本,然后涉及到最新的版本,但是

  python -c 'import ssl; print(ssl.OPENSSL_VERSION)' ,python中还是旧的版本,不知道如何升级python中的openssl

  搜索各种资料,没有结果偶然间看到pyOpenSSL这个模块,抱着试一下的态度安装了这个模块,

  然后调用前 import OpenSSL 然后再去调用接口,问题就这样解决了............  

 

posted @ 2017-11-08 12:07  IT小工Joey  阅读(377)  评论(0编辑  收藏  举报