2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failedの対処法

Last updated at Posted at 2022-01-31

##問題
PythonでWebスクレイピングをする時に

import urllib.request
response=urllib.request.urlopen('https://yahoo.co.jp') 

しようとしたら,

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

と出力されてしまった.

##解決方法

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

とコマンドを叩くと証明書の検証がうまくいった.

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?