Apr-23-2019, 06:02 PM
The query should be, according to my update (which I used as a patch but might be simply wrong):
API_key = "XXX" base_url = "http://api.openweathermap.org/data/2.5/weather?" search_template = base_url + "appid=" + API_key + "&q={}"According to the manual, it should be:
search_template = "http://api.openweathermap.org/data/2.5/find?q={}&type=like"By running your listing
https://openweathermap.org/find?q=Vancouver
, I get:File "/home/gigiux/Documents/main.py", line 30, in found_location data = json.loads(data.decode()) if not isinstance(data, dict) else data AttributeError: 'str' object has no attribute 'decode'Is this getting closer?