0

I am trying to familiarize myself with the urllib module in Python 3. The code below is not working on my computer but works when I test it on repl.it for some reason.

Please let me know what I am doing wrong, I am running python 3.6.5 if that helps.

    import urllib.request 
    req = urllib.request.urlopen('http://www.pythonprogramming.net') 
    print (req.read())

The error I get is

urllib.error.URLError: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)

I am using a Mac

user2722968
  • 13,636
  • 2
  • 46
  • 67
Ramanujan
  • 1
  • 1

0 Answers0