1

When trying to run the following code (Being X the proxy I'm using),

from requests import get

try:
    r = get("https://www.google.com", proxies = {"https": "https://X"})
    print(r.content)
except Exception as err:
    print(err)

I get the following error:

HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1045)')))

But If I do not use any proxies, the request is successful.

It works perfectly fine on my old win7 computer and it also works on all of the servers I've tested it on, so I assume it's something related to Windows10, but as I say, it's just a guess.

Does anyone have any idea on how to fix this? (I've tried multiple things I've found on the internet already, but none have worked)

nlim
  • 11
  • 2
  • *"I've tried multiple things I've found on the internet already, but none have worked"* - which says __exactly nothing__ what you've actually tried, i.e. the information gain here is zero. I therefore closed it as a duplicate of an existing question. If you feel that this is not a duplicate please provide sufficient information on how it differs. Please also provide a way to reproduce the problem by others so that one can actually help you. – Steffen Ullrich Jan 01 '21 at 06:19
  • @SteffenUllrich Please, read again the question. It's not a duplicate in any way, my code WORKS, as stated in the question, but it doesn't work on Win10. The solution to the question you've linked isn't helpful at all because as I said, my code and proxy work fine, but they don't work on Win10. Also, I said I've tried multiple things as in I haven't found any solution on this site or any other, I've tried reinstalling, updating, using urllib3 instead of requests, etc. – nlim Jan 02 '21 at 16:20

0 Answers0