Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5239 closed patch (fixed)

Mythweather Envcan parser temperature problem

Reported by: knightr@… Owned by: stuartm
Priority: minor Milestone: 0.21.1
Component: mythweather Version: head
Severity: low Keywords:
Cc: Ticket locked: no


It would appear that the layout of the Environment Canada weather info changed so the parser can no longer correctly decode it, this attempts to correct this.

If anybody can find something it's unable to deal with, please let me know...

I haven't changed anything in the logic used to deal with the fact that the info provided in the rss feed is incomplete (it uses the info of the previous or next day) so if you see slight discrepencies compare the info with the one in the rss feed.

Attachments (1)

badtemps.diff (1.2 KB) - added by knightr@… 13 years ago.
patch to correct the temperature problem

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by knightr@…

Attachment: badtemps.diff added

patch to correct the temperature problem

comment:1 Changed 13 years ago by anonymous

Thanks for the patch. Sometimes Environment Canada reports a temperature as 'plus 5', and sometimes it's just '5'. That's why the parser was failing to grab the data properly. This patch fixes it nicely. :)

Thanks Nicolas.

-- Joe Ripley vitaminjoe@…

comment:2 Changed 13 years ago by knightr@…

It almost look like the way the temps above 0 are reported depend on how close it is to 0...

"5" is reported as "plus 5" while "7" is only reported as "7"...

Thank you Joe for both the parser and for confirming that my patch seems to have corrected the problem...

Have a nice day!


comment:3 Changed 13 years ago by stuartm

Milestone: unknown0.21.1
Status: newaccepted

comment:4 Changed 13 years ago by Joe Ripley

Finally got around to moving from an older SVN release to 0.21-fixes. This bug is still present in 0.21-fixes, however, the patch applies cleanly and works great.

Could we apply this patch to trunk and backport it to 0.21-fixes? 3-Day and 6-Day screens for ENVCAN are unusable otherwise...


-- Joe Ripley vitaminjoe@…

comment:5 Changed 13 years ago by anonymous

Hi Joe,

I don't think it is applied to trunk either(at least it wasn't the last time I checked out).

Have a nice day!


PS: Did you receive my email (sent June 7th) about the other modifications I made to the script (ie parsing the French feed in addition to the English one...)?

comment:6 Changed 13 years ago by knightr@…

Sorry, I somehow missed the "apply to trunk" part in your message...


comment:7 Changed 13 years ago by stuartm

Resolution: fixed
Status: acceptedclosed

(In [17718]) Fix temperature display problem with the EnvCan? script. Patch from knightr, closes #5239

comment:8 Changed 13 years ago by stuartm

(In [17719]) Backport EnvCan? temperature fix to -fixes. Refs #5239

Note: See TracTickets for help on using tickets.