Python中文
首页
教程
问答
标签
搜索
登录
注册
抑制不安全的请求警告:Python2.6中正在发出未验证的HTTPS请求
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我使用<a href="https://github.com/vmware/pyvmomi">pyVmomi</a>在Python2.6中编写脚本,同时使用一种连接方法:</p> <pre><code>service_instance = connect.SmartConnect(host=args.ip, user=args.user, pwd=args.password) </code></pre> <p>我收到以下警告:</p> <pre><code>/usr/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py:734: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) </code></pre> <p>有趣的是,我没有在pip中安装urllib3(但它在<em>/usr/lib/python2.6/site-packages/requests/packages/urllib3/</em>中)。</p> <p>我已经按建议试过了<a href="https://urllib3.readthedocs.org/en/latest/security.html">here</a></p> <pre><code>import urllib3 ... urllib3.disable_warnings() </code></pre> <p>但这并没有改变什么。</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>这是2017年的答案。<code>urllib3</code>不再是<code>requests</code>的一部分</p> <pre><code>import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何提高Djang的410误差
5 回答
如何提高doc2vec模型中两个文档(句子)的余弦相似度?
4 回答
如何提高Docker的日志限制?|[输出已剪裁,达到日志限制100KiB/s]
3 回答
如何提高DQN的性能?
4 回答
如何提高EasyOCR的准确性/预测?
8 回答
如何提高Euler#39项目解决方案的效率?
6 回答
如何提高F1成绩进行分类
6 回答
如何提高FaceNet的准确性
9 回答
如何提高fft处理的精度?
2 回答
如何提高Fibonacci实现对大n的精度?
6 回答
如何提高Flask与psycopg2的连接时间
3 回答
如何提高FosterCauer变换的scipy.signal.invres()的数值稳定性?
10 回答
如何提高gae查询的性能?
2 回答
如何提高GANs用于时间序列预测/异常检测的结果
2 回答
如何提高gevent和tornado组合的性能?
10 回答
如何提高googleappengin请求日志的吞吐量
2 回答
如何提高googlevision文本识别的准确性
7 回答
如何提高groupby/apply效率
4 回答
如何提高Gunicorn中的请求率
9 回答
如何提高G中的文件编码转换
2 回答