Comment

Comment by mywittyname

I think you're API key might be out of requests. I'm getting this error, no matter what location I put in, even though the Location block correctly returns the coordinates for whatever city I put in.

    Exception                                 
    Traceback (most recent call last)
    <ipython-input-5-9b29f394b1fd> in <module>
          7 location_response = requests.get(f'https://api.opencagedata.com/geocode/v1/json?key={OPENCAGEDATA_API_KEY}&q={Location}&no_annotations=1&limit=1')
          8 if not location_response.ok:
    ----> 9     raise Exception('Location not found')
         10 
         11 location_json = location_response.json()

    Exception: Location not found
parent mywittyname 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton