felixhageloh / weather-widget

A weather widget for Übersicht
64 stars 32 forks source link

Undefined is not an object error #7

Closed mike-koch closed 9 years ago

mike-koch commented 9 years ago

I just set up the widget (set City/State/Region), and instead of seeing the weather, I see this instead:

undefined is not an object (evaluating 'weather.condition.temp')

Am I missing something that I didn't do?

davidnelsondn commented 9 years ago

I'm getting the above error as well.

felixhageloh commented 9 years ago

Can you send a screen shot of your options (you can just paste it here) and I'll see if I can reproduce this problem

dotgray commented 9 years ago

Try testing it with a static city name of more than one word; I could replicate this error when I tried anything other than a single-word city for the weather location, while single-word city names correctly displayed. (Since it's not initially clear what place name is pulled by the location API, I set staticLocation: true for this.) Maybe the 'city' variable needs to be URL encoded for the el.find function?

felixhageloh commented 9 years ago

k, found the issue. Yahoo Weather wants spaces in city names replaced with a '-' I will release a fix soon, but in the meantime, you can get it fixed by typing the dash yourself. So

city: "San Francisco"

would become

city: "San-Francisco"

thanks for the tip @dotgray!

felixhageloh commented 9 years ago

fix has been released