`ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)` When opening sheet
See original GitHub issueAfter successfully authenticating I’m getting an SSL error whenever I try to open a sheet.
scope = ['https://spreadsheets.google.com/feeds']
credentials = SignedJwtAssertionCredentials(GOOGLE_AUTH['client_email'], GOOGLE_AUTH['private_key'], scope)
gc = gspread.authorize(credentials)
sh = gc.open('Genesis-QuestionBank')
Traceback (most recent call last):
File "genesis/bin/import_questions.py", line 27, in <module>
sh = gc.open('Genesis-QuestionBank')
File "/Users/administrator2/.virtualenvs/genesis/lib/python2.7/site-packages/gspread/client.py", line 134, in open
feed = self.get_spreadsheets_feed()
File "/Users/administrator2/.virtualenvs/genesis/lib/python2.7/site-packages/gspread/client.py", line 220, in get_spreadsheets_feed
r = self.session.get(url)
File "/Users/administrator2/.virtualenvs/genesis/lib/python2.7/site-packages/gspread/httpsession.py", line 79, in get
return self.request('GET', url, **kwargs)
File "/Users/administrator2/.virtualenvs/genesis/lib/python2.7/site-packages/gspread/httpsession.py", line 71, in request
uri.scheme + uri.netloc].request(method, url, data, headers=request_headers)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1001, in request
self._send_request(method, url, body, headers)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1035, in _send_request
self.endheaders(body)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 997, in endheaders
self._send_output(message_body)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 850, in _send_output
self.send(msg)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 812, in send
self.connect()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1212, in connect
server_hostname=server_hostname)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 350, in wrap_socket
_context=self)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 566, in __init__
self.do_handshake()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 788, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Issue Analytics
- State:
- Created 8 years ago
- Comments:18 (2 by maintainers)
Top Results From Across the Web
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed ...
The shell script got executed. Opened the Python 3.6.5 and typed in nltk.download() .The download graphic window opened and all the packages got...
Read more >Python API SDK SSL: CERTIFICATE_VERIFY_FAILED Error
Answers. Since the error is "SSL: Certificate_Verify_Failed", this error is likely due a non up-to-date environment. I believe Python on MacOS ...
Read more >[Solved] urllib.error.URLError: [SSL - Clay-Technology World
Simply put, the error seems an error in verifying the SSL certificate. Maybe the target website uses a certificate signed by itself, I'm...
Read more >4 Ways to fix SSL: CERTIFICATE_VERIFY_FAILED in Python
If you receive the “certificate_verify_failed” error when trying to connect to a website, it means that the certificate on the website is not...
Read more >SSL Certificate Invalid - Python API - DataRobot Community
Solved: Hi, The error as it says is because it cannot validate certificates. Setting ssl_verify =False, works but it throws.
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 FreeTop 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
Top GitHub Comments
So, I don’t know what happened, but for some reasons python package Requests 2.16.0 started requiring Certifi, which causes this SSL error. I had to specify version 2.15.1 to be able to uninstall certifi and restore service to my automation.
pip install requests==2.15.1; pip uninstall -y certifi
I thought I posted a comment about what this was for me - it turned out the Python package “certifi” which is part of a other Python package “Tornado” was causing this error. I used:
pip uninstall -y certifi
And the error went away, and Tornado appeared to still work.