Can't download images for logpuzzle

227 views
Skip to first unread message

Barry Hellman

unread,
Dec 3, 2015, 11:10:25 PM12/3/15
to Python GCU Forum
I can't seem to get urllib.urlretrieve to download the files for the logpuzzle exercise.

I am getting this error:

IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Here is the URL i am trying to access:
http://code.google.com/edu/languages/google-python-class/images/puzzle/a-baaa.jpg

It get's re-directed to:
https://developers.google.com/edu/python/images/puzzle/a-baaa.jpg?csw=1

I tried just using the re-directed URL and get the same error.


rocketbackdude

unread,
Dec 3, 2015, 11:19:42 PM12/3/15
to Python GCU Forum
I tried the Solution script and got the same error.

rocketbackdude

unread,
Dec 4, 2015, 12:16:42 AM12/4/15
to Python GCU Forum
nevermind, i figured it out:

http://stackoverflow.com/questions/27835619/ssl-certificate-verify-failed-error

need to import ssl
then do this: context = ssl._create_unverified_context()
and then urllib.urlretrieve(___,___,context=context)

On Thursday, December 3, 2015 at 11:10:25 PM UTC-5, rocketbackdude wrote:
Reply all
Reply to author
Forward
0 new messages