python自动化测试---报错总结

1. 运行程序时,报如下错误:html

HTTPSConnectionPool(host='test.xxxx.com', port=443): Max retries exceeded with url: /openapi/smartStock/000008.SZ.shtml (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))api

解决方法:requests请求时加上:verify=Falseide

image.png


2. 不显示warning信息url

import urllib3htm

# 去掉运行时的Warningblog

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)ssl

相关文章
相关标签/搜索