Ticket #5239 (closed patch: fixed)
Opened 4 years ago
Last modified 4 years ago
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 |
Description
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
Change History
Changed 4 years ago by knightr@…
- Attachment badtemps.diff added
comment:1 Changed 4 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 4 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!
Nick
comment:3 Changed 4 years ago by stuartm
- Status changed from new to accepted
- Milestone changed from unknown to 0.21.1
comment:4 Changed 4 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...
Thanks!
-- Joe Ripley vitaminjoe@…
comment:5 Changed 4 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!
Nick
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 4 years ago by knightr@…
Sorry, I somehow missed the "apply to trunk" part in your message...
Nick
comment:7 Changed 4 years ago by stuartm
- Status changed from accepted to closed
- Resolution set to fixed

patch to correct the temperature problem