에러 SSLCertVerificationError requests package를 쓰는 client에서 오류
---------------------------------------------------------------------------
SSLCertVerificationError Traceback (most recent call last)
생략..
site-packages/cads_api_client/api_client.py:69: UserWarning: HTTPSConnectionPool(host='cds-beta.climate.copernicus.eu', port=443): Max retries exceeded with url: /api/catalogue/v1/messages (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1149)')))
warnings.warn(str(exc), UserWarning)
2.
import requests
url = "https://example.com"
response = requests.get(url, verify=False)
requests를 사용할 때 자주 나오는 에러인데, 이때 verify=False로 설정하면 오류가 나타나지 않는다고 한다
import cdsapi
c = cdsapi.Client(verify=False)
이 경우처럼, 도메인이 직접 설정한 API 패키지가 있다면
이렇게 verify=False를 넣어서 비슷한 효과를 얻을 수 있다.
다만 이처럼 Client라는 오브젝트를 초기화(init)할 때 verify를 받는지는 확인해봐야 한다.
Reference
SSL: CERTIFICATE_VERIFY_FAILED certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))
Working on scripts to connect to AWS and recently started getting this error when I try to install a python module or execute a script I get the following error: [SSL: CERTIFICATE_VERIFY_FAILED]
stackoverflow.com