小编use*_*008的帖子

如何修复 VS Code 环境中的“发生异常:SSLError HTTPSConnectionPool”

我尝试使用 python requests 库,但收到此错误 我大部分时间在 Windows 10 中使用 psiphon VPN,并在调用后收到以下错误requests.get('[API URL]')

Exception has occurred: SSLError
HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /user (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)')))

During handling of the above exception, another exception occurred:


During handling of the above exception, another exception occurred:

  File "C:\Users\Hessam\Desktop\QWE.py", line 3, in <module>
    r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
Run Code Online (Sandbox Code Playgroud)

python windows error-handling ssl

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

error-handling ×1

python ×1

ssl ×1

windows ×1