(仅做备忘)
近期企业微信发送消息提示错误
File "E:\Anaconda3\lib\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='qyapi.weixin.qq.com', port=443): Max retries exceeded with url: /cgi-bin/gettoken?corpid=****&corpsecret=**** (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000026B7154CB70>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))
临时解决方案:
hosts文件加入
183.192.202.172 qyapi.weixin.qq.com