Softlayer Python API TransportError SSL CERTIFICATE_VERIFY_FAILED (_SSL.C:590) -
what used working python code make api calls softlayer, gives errors.
import softlayer conn = softlayer.create_client_from_env(username='',api_key='') allparents = conn.call('account','getalltoplevelbillingitems') allparents[0] # returns first billing_item dict
it used work, 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)
this may related 1 ssl insecureplatform error when using requests package
softlayer has documented ssl errors:
on python versions below python 2.7.9, requests has started emitting security warning (insecureplatformwarning) due insecurities creating ssl connections. resolve this, upgrade python 2.7.9+ or follow instructions here: https://stackoverflow.com/a/29099439.
please make sure using python 2.7.9 or supirior , try again
Comments
Post a Comment