Jump to content
  • 0
Sign in to follow this  

Moksha Weather forecast module bug


The weather forecast module reports windchill  in Fahrenheit even when the general setting is Celsius. Stupid, and I mean really stupid bug. Embarrassing.

Share this post

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

The weather forecast module reports windchill  in Fahrenheit even when the general setting is Celsius. Stupid, and I mean really stupid bug. Embarrassing.


Well thanks for reporting this. 


For the record no bug is stupid to me, stuff happens and all non trivial software has bugs.


I have alot of bodhi related stuff I am working on at the moment and my current project of adding font support to ePad takes priority at the moment. But I did take some time today to look at this issue. It is not as far as I can tell a bug with our forecast module. Our module simply reads an xml file fetched from yahoos weather site. The windchill field being reported in F regardless of a request for Celsius is on their end. Our module simply displays what it reads from their xml file. For my location with Celsius settings the xml file is found at:


href="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%3D12770197%20and%20u%3D" c'"="">http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%3D12770197%20and%20u%3D'c'


In the event Yahoo fixes this bug the contents of this xml on Apr 22 2017:



This XML file does not appear to have any style information associated with it. The document tree is shown below.

yahoo:count="1" yahoo:created="2017-04-22T17:53:46Z" yahoo:lang="en-US">

distance="km" pressure="mb" speed="km/h" temperature="C"/>

Yahoo! Weather - Ladson, SC, US


Yahoo! Weather for Ladson, SC, US


Sat, 22 Apr 2017 01:53 PM EDT


city="Ladson" country="United States" region=" SC"/>

chill="84" direction="210" speed="22.53"/>

humidity="43" pressure="34270.27" rising="0" visibility="25.91"/>

sunrise="6:43 am" sunset="7:56 pm"/>

Yahoo! Weather





Conditions for Ladson, SC, US at 01:00 PM EDT




Sat, 22 Apr 2017 01:00 PM EDT

code="30" date="Sat, 22 Apr 2017 01:00 PM EDT" temp="29" text="Partly Cloudy"/>

code="34" date="22 Apr 2017" day="Sat" high="30" low="18" text="Mostly Sunny"/>

code="4" date="23 Apr 2017" day="Sun" high="28" low="20" text="Thunderstorms"/>

code="47" date="24 Apr 2017" day="Mon" high="23" low="16" text="Scattered Thunderstorms"/>

code="39" date="25 Apr 2017" day="Tue" high="23" low="13" text="Scattered Showers"/>

code="30" date="26 Apr 2017" day="Wed" high="27" low="15" text="Partly Cloudy"/>

code="34" date="27 Apr 2017" day="Thu" high="30" low="17" text="Mostly Sunny"/>

code="30" date="28 Apr 2017" day="Fri" high="30" low="19" text="Partly Cloudy"/>

code="30" date="29 Apr 2017" day="Sat" high="29" low="20" text="Partly Cloudy"/>

code="4" date="30 Apr 2017" day="Sun" high="29" low="20" text="Thunderstorms"/>

code="47" date="01 May 2017" day="Mon" high="27" low="18" text="Scattered Thunderstorms"/>

Current Conditions:
Partly Cloudy

Sat - Mostly Sunny. High: 30Low: 18
Sun - Thunderstorms. High: 28Low: 20
Mon - Scattered Thunderstorms. High: 23Low: 16
Tue - Scattered Showers. High: 23Low: 13
Wed - Partly Cloudy. High: 27Low: 15

Forecast at Yahoo! Weather

(provided by >The Weather Channel)




Notice I have requested Celsius:


  xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"  distance="km" pressure="mb" speed="km/h" temperature="C"/>


but windchill clearly is in F:


 xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"  chill="84" direction="210" speed="22.53"/>


even tho temperature is reported in Celsius:


 xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"  code="30" date="Sat, 22 Apr 2017 01:00 PM EDT" temp="29"  text="Partly Cloudy"/>


Hence what the forecast module displays IS accurate in the sense it displays what was reported to it by Yahoo.



hmm the weird part is sometimes Yahoo actually reports the window chill correctly in C. SO the problem is intermittent ...


My whole point being with all this is

  • This bug is not our fault
  • I am not going to fix this issue at this time (add a hack to detect yahoo incorrectly reporting wind chill in the wrong units and convert the field to the right units).
  • I expect in time Yahoo will fix said issue
Štefan may feel different and if he patches the module more power to him. BTW patches are accepted so if this bugs you enough Wolfgang you are certainly free to patch it yourself.
  • Like 2

Share this post

Link to post
Share on other sites
  • 0

Yes, exactly. I can confirm these words. I spent some time with this module and can say the same. This bug is on the Yahoo side. I am not sure I will fix this issue because if Yahoo will fix it, it will need another fix again. Let's give it some time and then we will see.


Maybe the good idea is to report this bug somewhere if possible...


Anyway. I have fixed another part of the forecast module. If you change the units in the settings dialog, the values on the right side don't respect it. Now it works properly. Wait for the new package in the repository...

  • Like 2

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this