ageitgey / medium_to_ghost

Instantly move all your Medium.com content (formatted posts + images) to an open source Ghost blog!
MIT License
121 stars 13 forks source link

urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] #9

Closed brunobuddy closed 5 years ago

brunobuddy commented 5 years ago

I am getting an error because of some failed validation when I follow the README

self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

This happends when I do python3 -m medium_to_ghost.medium_to_ghost medium-export.zipon MacOS 10.14.4 and using Python 3.7.3

polluterofminds commented 5 years ago

Running this command seems to work:

sudo /Applications/Python\ 3.7/Install\ Certificates.command

Make sure to specify the correct version of Python installed on your machine. This command also assumes you're using MacOS.

ageitgey commented 5 years ago

The response from @jehunter5811 is correct. The problem is that Python on Mac doesn't install SSL certificates by default for some reason and you have to run that command manually to install them. Otherwise no python programs can access https sites.