(Jul-25-2017, 07:00 AM)s1monsays Wrote: Haha I wish, nah I already tried that.
Well, post your attempt at this, because it's exactly what should be done... Don't forget to post also any full traceback you get... in proper tags
wid returned by
client.fetch_woeid
is a str:example from the docs
>>> client.fetch_woeid("Beijing, China") '2151330'and again fetch the weather example from the docs
>>> beijing_weather = client.fetch_weather("2151330") >>> beijing_weather["guid"] 'CHXX0008_2013_01_06_7_00_CST' >>> beijing_weather["description"] 'Yahoo! Weather for Beijing, CN' >>> beijing_weather["condition"]["temp"] '28'
I just missed that
wid = client.fetch_woeid('loc_c, loc_s')should be
wid = client.fetch_woeid("{}, {}".format(loc_c, loc_s))