1.问题描述:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='passport.cnblogs.com', port=443): Max retries exceeded with url: /user/signin (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强 迫关闭了一个现有的连接。', None, 10054, None)))
解决方案:
import os
os.environ['NO_PROXY'] = 'stackoverflow.com'

2问题描述:
C:\Python37\lib\site-packages\urllib3\connectionpool.py:1004: 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,
解决方案:
在导包时加入如下两行,取消警报
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

相关文章:

  • 2021-08-01
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2022-01-01
  • 2021-12-11
  • 2021-05-18
猜你喜欢
  • 2021-05-03
  • 2021-09-06
  • 2021-07-09
  • 2021-05-13
  • 2021-06-05
  • 2021-10-18
  • 2021-06-28
相关资源
相似解决方案