On Windows Vista SP2 + Python 2.7.10 I can connect to https://www.python.org, but not to https://codereview.appspot.com
The script:
HOST1 = 'https://www.python.org'
HOST2 = 'https://codereview.appspot.com'
import urllib2
print HOST1
urllib2.urlopen(HOST1)
print HOST2
urllib2.urlopen(HOST2)
And the output:
E:>py test.py
https://www.python.org
https://codereview.appspot.com
Traceback (most recent call last):
File "test.py", line 9, in <module>
urllib2.urlopen(HOST2)
File "C:Python27liburllib2.py", line 158, in urlopen
return opener.open(url, data, timeout)
File "C:Python27liburllib2.py", line 435, in open
response = self._open(req, data)
File "C:Python27liburllib2.py", line 453, in _open
'_open', req)
File "C:Python27liburllib2.py", line 413, in _call_chain
result = func(*args)
File "C:Python27liburllib2.py", line 1244, in https_open
context=self._context)
File "C:Python27liburllib2.py", line 1201, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
How can I troubleshoot, what exactly is wrong with https://codereview.appspot.com/ ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…