Home Ask Login Register

Developers Planet

Your answer is one click away!

MS6 February 2016

Softlayer Python API TransportError SSL CERTIFICATE_VERIFY_FAILED (_SSL.C:590)

What used to be working python code to make API calls from SoftLayer, now gives errors.

import SoftLayer

conn = SoftLayer.create_client_from_env(username='',api_key='')

allParents = conn.call('Account','getAllTopLevelBillingItems')

allParents[0] # returns the first billing_Item as a dict

It used to work, but now the following error messages appear:

result = conn['SoftLayer_Account'].getAllTopLevelBillingItems(mask=objectMask)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 363, in call_handler
    return self(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 331, in call
    return self.client.call(self.name, name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py", line 227, in call
    return self.transport(request)
  File "/usr/local/lib/python2.7/dist-packages/SoftLayer/transports.py", line 164, in __call__
    raise exceptions.TransportError(0, str(ex))
SoftLayer.exceptions.TransportError: TransportError(0): [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)


Nelson Raul Cabero Mendoza February 2016

This may be related with this one SSL InsecurePlatform error when using Requests package

Softlayer has documented this about SSL errors:

On Python versions below Python 2.7.9, requests has started emitting a security warning (InsecurePlatformWarning) due to insecurities with creating SSL connections. To resolve this, upgrade to Python 2.7.9+ or follow the instructions here: http://stackoverflow.com/a/29099439.

please make sure you are using Python 2.7.9 or supirior and try again

aarmor February 2016

I found a couple of months ago that if the python certifi package was installed, this would cause SoftLayer API traffic to fail certificate validation.

I never found out why, I just avoided the packages that created that dependency. In my case, I was trying to install flower.

Post Status

Asked in February 2016
Viewed 2,975 times
Voted 7
Answered 2 times


Leave an answer

Quote of the day: live life