Skip to content
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

SSL: CERTIFICATE_VERIFY_FAILED #175

Open
tanyanghan opened this issue Dec 11, 2018 · 0 comments
Open

SSL: CERTIFICATE_VERIFY_FAILED #175

tanyanghan opened this issue Dec 11, 2018 · 0 comments

Comments

@tanyanghan
Copy link

Python: 2.7.15
MacOS Mojave 10.14.1

If the parse endpoint is a https://, I'm getting a:

File "/Library/Python/2.7/lib/python/site-packages/parse_rest/connection.py", line 140, in execute
    response = urlopen(request, timeout=CONNECTION_TIMEOUT)
... <other stuff> ...
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>

I added an argument cafile to parse_rest/connection.py line 140 pointing to my certifi pem file (/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/certifi/cacert.pem) which fixed my problem:

urllib2.urlopen(url[, data[, timeout[, cafile[, capath[, cadefault[, context]]]]])

( https://docs.python.org/2/library/urllib2.html#urllib2.urlopen )

Is there a more correct way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant