Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Error to create the client in Windows 7 + python 3.4 #32

Open
raulcabero opened this issue Dec 9, 2014 · 3 comments
Open

Error to create the client in Windows 7 + python 3.4 #32

raulcabero opened this issue Dec 9, 2014 · 3 comments

Comments

@raulcabero
Copy link

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.

@seanlanich
Copy link

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

@proind
Copy link

proind commented Mar 8, 2015

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

@rubercuellar
Copy link

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants