반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- hive
- PySpark
- GIT
- Java
- Python
- gas
- numpy
- Redshift
- string
- Github
- 파이썬
- Excel
- matplotlib
- PANDAS
- Google Excel
- list
- Kotlin
- PostgreSQL
- c#
- Google Spreadsheet
- Apache
- Tkinter
- Mac
- array
- math
- dataframe
- django
- google apps script
- SQL
Archives
- Today
- Total
달나라 노트
Python Basic : urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate 본문
Python/Python Basic
Python Basic : urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
CosmosProject 2022. 7. 12. 19:42728x90
반응형
여러 library를 이용해 python 코드를 작성하고 실행하면 간혹 아래와같은 에러가 발생할 때가 있습니다.
urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
SSL 인증에 뭔가 문제가 있어서 위 에러가 발생하는건데 해결방법은 2가지가 있습니다.
Solution 1.
pip install certifi
terminal에 위 command를 실행시켜 certifi를 설치해줍니다.
간단한 방법이지만 저는 이걸로 해결이 안되더라구요.
Solution 2.
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
이건 좀 더 확실한 방법입니다.
작성한 Python code에서 위 코드를 삽입하여 실행되게합니다.
SSL certificate error가 발생하는 부분보다 이전에 위 코드블록을 실행되도록 하면 됩니다.
어떤 부분에서 SSL certificate error가 발생하는지 모른다면 그냥 프로그램 시작부분에 위 코드블록을 실행하도록 하면 됩니다.
728x90
반응형
'Python > Python Basic' 카테고리의 다른 글
Comments