-
Notifications
You must be signed in to change notification settings - Fork 2.5k
SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@maheshgmv Can you share the code that you are using for authentication? |
Closing this issue because there was no response for over 7 days. Feel free to reopen this issue if the problem reappears. |
@bantini i'm using hello_analytics_api_v3.py code for authentication. Link to the code [https://github.com/google/google-api-python-client/blob/master/samples/analytics/hello_analytics_api_v3.py] |
I got the same error urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) adul_service = client.GetService('AdwordsUserListService', version=googleads
_version)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\googleads\a
dwords.py", line 454, in GetService
**kwargs)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\suds\client
.py", line 112, in __init__
self.wsdl = reader.open(url)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\suds\reader
.py", line 152, in open
d = self.fn(url, self.options)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\suds\wsdl.p
y", line 136, in __init__
d = reader.open(url)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\suds\reader
.py", line 79, in open
d = self.download(url)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\suds\reader
.py", line 95, in download
fp = self.options.transport.open(Request(url))
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\suds\transp
ort\http.py", line 62, in open
return self.u2open(u2request)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\site-packages\suds\transp
ort\http.py", line 118, in u2open
return url.open(u2request, timeout=tm)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\urllib2.py", line 429, in
open
response = self._open(req, data)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\urllib2.py", line 447, in
_open
'_open', req)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\urllib2.py", line 407, in
_call_chain
result = func(*args)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\urllib2.py", line 1241, i
n https_open
context=self._context)
File "E:\APPS\RP_Jobs\Python\miniconda\envs\py27\lib\urllib2.py", line 1198, i
n do_open
raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate ve
rify failed (_ssl.c:661)> |
This is working fine for me. I would suggest the following:
|
Also getting the same mistake:
|
@cubicova17 Which version of the library, and Python are you using? |
-- Python 2.7.13 |
@cubicova17 Can you try updating google-api-python-client to the latest version (1.6.4)? |
Closing this issue, because it couldn't be replicated with the latest version. |
Hi I'm facing the same issue. Got error message: _urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate ve Checked my python and lib versions, don;t think it's the version issue. Anyone can suggest what are the potential reason? |
@KathyShen I was also getting this error which started a few days ago from the googleapis.com URL I'm on python 2.7.10 I upgraded the following packages to these versions in my project. I'd check to see if you have any of these listed in your requirements pointing at specific older versions
|
Traceback (most recent call last): |
Seeing the same thing with the latest google appengine release, python 2.7.13 |
same problem here with Python version Python 2.7.12
|
@zdavatz is your environment appengine too? |
No. I am now using https://github.com/jeduan/playup to publish my APK from commandline. Works well. |
This was happening to me too, I was using the sdk1.9.40 - updating my sdk to 1.9.70 fixed things |
@kaansoral can you elaborate? You're talking about the gcloud app Python extensions right? |
Oops, I was talking about the App Engine Linux Python SDK |
Also seeing this. |
- The nightly-run.sh script as run in production Jenkins is failing with an SSL handshake error in httplib2. - An issue discussed on the google-api-python-client github suggests upgrading might solve this: googleapis/google-api-python-client#453 @schmie
- The nightly-run.sh script as run in production Jenkins is failing with: httplib2.SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) - An issue discussed on the google-api-python-client github suggests upgrading might solve this: googleapis/google-api-python-client#453 @schmie
- The nightly-run.sh script as run in production Jenkins is failing with: httplib2.SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) - An issue discussed on the google-api-python-client github suggests upgrading might solve this: googleapis/google-api-python-client#453 @schmie
I am getting the same error with the following: What should I try now to fix the problem? |
@braunchris Try upgrading your PyOpenSSL to 19.0.0 which supports OpenSSL 1.1.1 |
Hi @braunchris, if you are having the same issue please post to a new issue and reference this one. Repository maintainers are more likely to miss replies to closed issues. Thanks! |
Update the httplib2 to latest version. It will solve the problem. |
googleapis/google-api-python-client#453 Closes googleapis/google-api-python-client#453 I can confirm that it solved it in my case
changes: Update google-api-python-client and httplib2 versions details: googleapis/google-api-python-client#453
I got the same problem and debugging the Google Lib I found out that the reason was that I was using an older version of If you already install the most recent, make sure that some lib is not installing an older version of |
I got a similar error on macOS Catalina using python 3.7.2 bundled with the OS. No such error using python 2.7.16 bundled with the OS. No error using |
I'm still getting this, here's my pip freeze:
|
Same issue here |
I'm running it on Mac iOS 10.14.6 with Python 3.6 installed via Anaconda. Right after the authentication flow it returns the error below: Authentication successful. I've searched in issues/stackflow however the found solution "/Applications/Python\ 3.6/Install\ Certificates.command" doesn't apply as the file couldn't be found on Macbook (or couldn't be found if Python is installed via Anaconda) |
I have followed this step and it worked for me (look for my comments) : |
In my case, I needed to add the certs to the
You mileage may vary, but hopefully this helps someone out. |
I was using google drive API in my python code and am also facing the same issue, |
For those who are still running into this issue on OSX, as it seems to still crop up from time to time, I was able to solve it by installing the most recent version of the gcloud SDK. OSX python has become pretty convoluted so many of the older solutions here were not quite accurate or seemed to be missing some key info. Note that when you install the sdk you will likely be prompted to change your python version. That said, the installation of the sdk seems to include some of the necessary certificates etc. to get things working again. It's also possible that just upgrading python 3.11 would have helped but worth a try if all else fails. |
I'm getting SSL error after oauth2 authentication
Warning (from warnings module):
File "C:\Python27\lib\site-packages\oauth2client_helpers.py", line 255
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
UserWarning: Cannot access analytics.dat: No such file or directory
Your browser has been opened to visit:
If your browser is on a different machine then exit and re-run this
application with the command-line parameter
--noauth_local_webserver
Traceback (most recent call last):
File "C:\Users\mahevarma\Desktop\analytics\HelloAnalytics.py", line 113, in
main()
File "C:\Users\mahevarma\Desktop\analytics\HelloAnalytics.py", line 107, in main
service = get_service('analytics', 'v3', scope, 'client_secrets.json')
File "C:\Users\mahevarma\Desktop\analytics\HelloAnalytics.py", line 43, in get_service
credentials = tools.run_flow(flow, storage, flags)
File "C:\Python27\lib\site-packages\oauth2client_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Python27\lib\site-packages\oauth2client\tools.py", line 243, in run_flow
credential = flow.step2_exchange(code, http=http)
File "C:\Python27\lib\site-packages\oauth2client_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Python27\lib\site-packages\oauth2client\client.py", line 2054, in step2_exchange
http, self.token_uri, method='POST', body=body, headers=headers)
File "C:\Python27\lib\site-packages\oauth2client\transport.py", line 282, in request
connection_type=connection_type)
File "C:\Python27\lib\site-packages\httplib2_init_.py", line 1659, in request
(response, content) = self.request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "C:\Python27\lib\site-packages\httplib2_init.py", line 1399, in _request
(response, content) = self.conn_request(conn, request_uri, method, body, headers)
File "C:\Python27\lib\site-packages\httplib2_init.py", line 1319, in conn_request
conn.connect()
File "C:\Python27\lib\site-packages\httplib2_init.py", line 1092, in connect
raise SSLHandshakeError(e)
SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
The text was updated successfully, but these errors were encountered: