简体   繁体   English

SSL:PYTHON 请求上的 WRONG_VERSION_NUMBER

[英]SSL: WRONG_VERSION_NUMBER ON PYTHON REQUEST

Python version: 3.9.1 Python 版本:3.9.1

I trying to write bot that send requests and it work perfectly fine, the only issue that i have is when i trying to use web debugging programs such as Charles 4.6.1 or Fiddler Everywhere.我试图编写发送请求的机器人,它工作得非常好,我唯一的问题是当我尝试使用 web 调试程序(如 Charles 4.6.1 或 Fiddler Everywhere)时。 When I open it to see bot traffic and response form server it crash showing me this error:当我打开它以查看机器人流量和响应表单服务器时,它崩溃了,向我显示了这个错误:

(Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1124)')))

I used to have this issue and I was able to fix it by simply adding verify=False to my request, but right now it does not work.我曾经遇到过这个问题,我可以通过简单地在我的请求中添加verify=False来解决它,但现在它不起作用。

I had the same problem.我有同样的问题。 It's a bug in urllib3.这是 urllib3 中的一个错误。 You have to specify your proxy in the request, and change the 'https' value to 'http'.您必须在请求中指定您的代理,并将“https”值更改为“http”。

My example:我的例子:

proxies = {'https': 'http://127.0.0.1:8888'}
request = r.get('https://www.example.net', verify=False, proxies=proxies)

Try this answer .试试这个答案

In short you should downgrade urllib:简而言之,您应该降级 urllib:

pip3 install urllib3==1.23

Works fine, problem solved.工作正常,问题解决。 I wonder what if this downgraded version will become soon deprecated in the future..我想知道如果这个降级版本将来会很快被弃用怎么办..

I had the same problem but i solved it by changing the "https" in the URL to "http":我有同样的问题,但我通过将 URL 中的“https”更改为“http”来解决它:

Example:例子:

ulr_example = 'https://example.com'

to

url_example = 'http://example.com'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python-Django [SSL:WRONG_VERSION_NUMBER]错误 - Python-Django [SSL: WRONG_VERSION_NUMBER] Error python 3 smtplib 异常:“SSL:WRONG_VERSION_NUMBER”登录到 Outlook - python 3 smtplib exception: 'SSL: WRONG_VERSION_NUMBER' logging in to outlook Python cassandra驱动程序-SSL:WRONG_VERSION_NUMBER - Python cassandra driver - SSL: WRONG_VERSION_NUMBER jupyter SSL:WRONG_VERSION_NUMBER - jupyter SSL: WRONG_VERSION_NUMBER python 请求:(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] 错误的版本号 (_ssl.c:1123)')) - python requests: (SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)')) python elasticsearch elasticsearch.exceptions.SSLError: ConnectionError([SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)) - python elasticsearch elasticsearch.exceptions.SSLError: ConnectionError([SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)) Azure 函数 (Python) 无法使用 [SSL: WRONG_VERSION_NUMBER] 连接到 Azure MySQL 实例 - Azure Functions (Python) cannot connect to Azure MySQL instance with [SSL: WRONG_VERSION_NUMBER] Python 错误 SSL: WRONG_VERSION_NUMBER 在几天前工作的代码上 - Python ERROR SSL: WRONG_VERSION_NUMBER on code that worked few days earlier Flask-Mail [SSL: WRONG_VERSION_NUMBER] 错误的版本号 (_ssl.c:1123) - Flask-Mail [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123) 如何修复错误 ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] 版本号错误? - How to fix the error ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM