I am new to Python and I'm trying to get the data from Nasa API by using this code.
import requests
data = requests.get('https://data.nasa.gov/resource/gh4g-9sfh.json')
Then it fails with the following error
SSLError: HTTPSConnectionPool(host='data.nasa.gov', port=443): Max retries exceeded with url: /resource/gh4g-9sfh.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1122)')))
I think it was looking for some SSL Certificate which I have no idea how to get. Since anyway it was for practising and nothing important I used the verification to False but that gives some other error.
data = requests.get('https://data.nasa.gov/resource/gh4g-9sfh.json',verify='False')
Which gives me the following error:
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: False
Although the error message has changed, looks like it's still expecting some sort of certificate.
What can I do to solve my problem?