softlayer / softlayer-object-storage-python

SoftLayer Object Storage Python Client
Other
19 stars 30 forks source link

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

Open raulcabero opened 9 years ago

raulcabero commented 9 years ago

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_storageinit.py", line 21, in get_client return get_httplib2_client(_args, *_kwargs) File "c:\python34\lib\site-packages\object_storageinit.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\httplib2init.py", line 1174, in request self.disable_ssl_certificate_validation) File "c:\python34\lib\site-packages\httplib2init.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 commented 9 years ago

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

proind commented 9 years ago

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

rubercuellar commented 8 years ago

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)