0

So here is the situation.

I am running a python script that should log into a website, and save the cookies to do more operations in the website. The program runs as expected on my computer, but... When I brought it to my Boss' computer, the program failed.

Here is the traceback message:

requests.exceptions.SSLError: HTTPSConnectionPool(host='www.somehost.com', port=443): Max retries exceeded with url: www.somehost.com (Caused by SSLError(SSLError(1, u'[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)'),))

This is my code:

from requests import Session

# create the session variable
s = Session()

# get the cookie format of any web page that will kick the bot out to log in
s.get(base_url + "prodmirr/servlet/Product/additional_template_list.html", verify=False)

It is definitely not a firewall issue. It can run as expected on my computer, even though I am cursed with McAfee, and my boss is lucky enough to use Windows Defender. We checked, and there is nothing that is blocked on his computer. We are both running the latest version of Windows 10.

We both have the same version of urllib. The solution in the possible duplicate question has changed nothing at all.

If any additional information is needed, please do not hesitate to ask. Thanks in advance.

CPSuperstore
  • 633
  • 10
  • 18
  • Possible duplicate of [HandShake Failure in python(\_ssl.c:590)](https://stackoverflow.com/questions/33778516/handshake-failure-in-python-ssl-c590) – wpercy Nov 14 '17 at 17:22
  • What I am trying to figure out is why it works on my computer, but not my boss' computer – CPSuperstore Nov 14 '17 at 17:24
  • It's possible you have different module versions or different cyphers set for urllib. You should take a look at the two questions linked in that duplicate - there are two very good solutions that you should try. (installing requests with extra security packages and manually setting urllib cyphers – wpercy Nov 14 '17 at 17:26

1 Answers1

0

I have solved the problem, after working on it almost all day. All of these issues seem to be happening with Requests Version 2.18.4, which is what my boss was using.

I am using version 2.11.1

To go from 2.18.4 to 2.11.1, simply execute the following commands in cmd.exe

pip uninstall requests
pip install requests==2.11.1

This fixes all problems with SSL. Thanks for your help.

CPSuperstore
  • 633
  • 10
  • 18