Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
451 views
in Technique[技术] by (71.8m points)

python - certificate verify failed: unable to get local issuer certificate

I am trying to get data from the web using python. I imported urllib.request package for it but while executing, I get error:

certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)

When I changed the URL to 'http' - I am able to get data. But, I believe, this avoids checking SSL certificate.

So I checked on the internet and found one solution: Run /Applications/Python 3.7/Install Certificates.command

This solved my problem. But I have no knowledge on SSL and the likes. Can you help me understand what it actually did to solve my issue.

If possible, please recommend me any good resource to learn about the security and certificates. I am new to this.

Thanks!

Note: I did go through the link - openssl, python requests error: "certificate verify failed"

My question differs from the one in link because, I want to know what actually happens when I install certifi package or run Install Certificates.command to fix the error. I have a poor understanding of securities.

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For anyone who still wonders on how to fix this, i got mine by installing the "Install Certificates.command"

Here is how I did,

Install Certificates.commad location

Just double click on that file wait for it to install and in my case, you will be ready to go


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...