softlayer-object-storage-python icon indicating copy to clipboard operation
softlayer-object-storage-python copied to clipboard

Error to create the client in Windows 7 + python 3.4

Open raulcabero opened this issue 11 years ago • 3 comments

When I tried to create the client (using windows 7 + python 3.4 ) I got the following error:

Traceback (most recent call last): File "C:\scripst\getdetails\customerObjectStorageIssue.py", line 3, in sl_storage = object_storage.get_client('XXXXX', 'XXXX', datacenter='dal05') File "c:\python34\lib\site-packages\object_storage__init__.py", line 21, in get_client return get_httplib2_client(args, *kwargs) File "c:\python34\lib\site-packages\object_storage__init.py", line 41, in get_httplib2_client conn = AuthenticatedConnection(auth) File "c:\python34\lib\site-packages\object_storage\transport\httplib2conn.py", line 31, in init self.auth.authenticate() File "c:\python34\lib\site-packages\object_storage\transport\httplib2conn.py", line 89, in authenticate res, content = http.request(self.auth_url, 'GET', headers=headers) File "c:\python34\lib\site-packages\httplib2__init__.py", line 1174, in request self.disable_ssl_certificate_validation) File "c:\python34\lib\site-packages\httplib2__init__.py", line 829, in init check_hostname=True) File "c:\python34\lib\http\client.py", line 1211, in init raise ValueError("check_hostname needs a SSL context with " ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED

In Ubuntu the same code is working fine.

raulcabero avatar Dec 09 '14 14:12 raulcabero

Has anyone had any luck with this issue? I have not yet been able to resolve...

seanlanich avatar Dec 29 '14 16:12 seanlanich

did anyone solve this issue ? I have it on OSx with python3.4 as well

proind avatar Mar 08 '15 16:03 proind

The solution that worked was to go to the init.py file located at C:\Python34\Lib\site-packages\httplib2 and change this line:

check_hostname=True)

to this: check_hostname=disable_ssl_certificate_validation ^ True)

rubercuellar avatar May 12 '16 21:05 rubercuellar