SSL Certificate Verify Failed
See original GitHub issueMay be related to https://github.com/smartsheet-platform/smartsheet-python-sdk/issues/36. Debian 8.0, Python 3.4
$ cat apitest.py
#!/usr/bin/env python
import smartsheet
import smartsheet.sheets
import pprint
client = smartsheet.Smartsheet()
sobj = smartsheet.sheets.Sheets(client)
slist = sobj.list_sheets(include_all=True)
pprint.pprint(slist)
$ python3 apitest.py
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 341, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 761, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 238, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/ssl_.py", line 279, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.4/ssl.py", line 364, in wrap_socket
_context=self)
File "/usr/lib/python3.4/ssl.py", line 577, in __init__
self.do_handshake()
File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 574, in urlopen
raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/smartsheet/smartsheet.py", line 208, in _request
res = self._session.send(prepped_request, stream=stream)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apitest.py", line 8, in <module>
slist = sobj.list_sheets(include_all=True)
File "/usr/local/lib/python3.4/dist-packages/smartsheet/sheets.py", line 662, in list_sheets
response = self._base.request(prepped_request, expected, _op)
File "/usr/local/lib/python3.4/dist-packages/smartsheet/smartsheet.py", line 178, in request
res = self.request_with_retry(prepped_request, operation)
File "/usr/local/lib/python3.4/dist-packages/smartsheet/smartsheet.py", line 242, in request_with_retry
return self._request(prepped_request, operation)
File "/usr/local/lib/python3.4/dist-packages/smartsheet/smartsheet.py", line 210, in _request
raise UnexpectedRequestError(rex.request, rex.response)
smartsheet.exceptions.UnexpectedRequestError: (<PreparedRequest [GET]>, None)
$ pip3 list --local
autopep8 (1.2.1)
Brlapi (0.6.2)
certifi (2015.11.20.1)
chardet (2.3.0)
defer (1.0.6)
devscripts (2.15.1)
docker-compose (1.5.1)
docker-py (1.6.0)
dockerpty (0.3.4)
docopt (0.6.2)
jsonschema (2.5.1)
lazr.uri (1.0.3)
louis (2.5.3)
Magic-file-extensions (0.2)
Mako (1.0.0)
MarkupSafe (0.23)
multi-key-dict (2.0.3)
pbr (1.8.1)
pep8 (1.6.2)
pip (7.1.2)
Pygments (2.0.1)
pygobject (3.14.0)
PyMySQL (0.6.7)
python-apt (0.9.3.11)
python-dateutil (2.4.2)
python-debian (0.1.23)
python-jenkins (0.4.11)
pyxdg (0.25)
PyYAML (3.11)
requests (2.7.0)
requests-toolbelt (0.5.1)
setuptools (19.4)
six (1.10.0)
smartsheet-python-sdk (1.0.1)
texttable (0.8.4)
unattended-upgrades (0.1)
wadllib (1.3.2)
websocket-client (0.34.0)
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
python - urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error
If you have installed Python 3.6 on OSX and are getting the "SSL: CERTIFICATE_VERIFY_FAILED" error when trying to connect to an https:// site,...
Read more >What is an SSL 'Certificate_Verify_Failed' Error and How Do I ...
SSL certificate_verify_failed errors typically occur as a result of outdated Python default certificates or invalid root certificates. If you're a website owner ...
Read more >4 Ways to fix SSL: CERTIFICATE_VERIFY_FAILED in Python
SSL certificate_verify_failed errors typically occur as a result of outdated Python default certificates or invalid root certificates. We will cover how to ...
Read more >A Simple Explanation of SSL Certificate Errors & How to Fix ...
An SSL certificate error occurs when a web browser can't verify the SSL certificate installed on a site. Rather than connect users to...
Read more >How to Fix SSL: CERTIFICATE_VERIFY_FAILED Error In ...
It tracks the certificate chain back to its root for verification. If the certificate is not valid, it will indicate the error. The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Tim, you solved the issue!
Much appreciated.
This issue is similar to #36
If @kbrandl’s solution doesn’t solve it try the following:
sudo pip install ndg-httpsclient pyasn1 --upgrade