ERROR :: SSLError: HTTPSConnectionPool

Published by onesixx on

SSLError: HTTPSConnectionPool(host=’api.coindesk.com’, port=443): Max retries exceeded with url: /v1/bpi/currentprice.json (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)’)))

import os
import json
import requests


URL = "https://api.coindesk.com/v1/bpi/currentprice.json"
response = requests.get(URL)
# way1
response = requests.get(URL, verify=False)
# way2
response = requests.get(URL, verify='/path/to/certification')
print(response)
#
Categories: Python Basic

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x