Open tanyanghan opened 5 years ago
Python: 2.7.15 MacOS Mojave 10.14.1
2.7.15
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:
cafile
parse_rest/connection.py
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/certifi/cacert.pem
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?
Python:
2.7.15
MacOS Mojave10.14.1
If the parse endpoint is a https://, I'm getting a:
I added an argument
cafile
toparse_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:( https://docs.python.org/2/library/urllib2.html#urllib2.urlopen )
Is there a more correct way to do this?