'SSL: WRONG_VERSION_NUMBER ON PYTHON REQUEST

Python version: 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. 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.



Solution 1:[1]

Try this answer.

In short you should downgrade urllib:

pip3 install urllib3==1.23

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 marcin