GNOME Bugzilla – Bug 628750
libgweather / weather-applet can no longer can no longer retrieve forecast data for locations parsing data from bom.gov.au
Last modified: 2015-11-20 06:02:41 UTC
Created attachment 169462 [details] Untested patched weather-bom.c. Note that this should be tested by someone who knows how to recompile the libgweather source. ----------------------------------- Issue Description ----------------------------------- In relation to "weather-applet" and "libgweather" - over the past several months, the Australian Bureau of Meteorology (BOM) has updated its website to deliver a HTML forecast page for a number of locations around Australia. Currently - the <zone> tag from "Locations.xml" is used within "weather-bom.c" to retrieve information from the appropriate bom.gov.au URL which if successful is then parsed in the "bom_parse" function. With the new HTML forecast pages for various locations however, the data can not be successfully parsed and instead the message "Forecast not currently available for this location." shows up on the Forecast tab of weather-applet. ----------------------------------- Area of Interest ----------------------------------- Within "weather-bom.c" - the following line of code points to URLs (depending on location) that now have HTML forecast data rather than plain text... url = g_strdup_printf ("http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?%s.txt", loc->zone + 1); ----------------------------------- Suggested Fix ----------------------------------- I suggest/propose that the URL above be changed to point to plain text documents on the BOM FTP server (ftp://ftp2.bom.gov.au/anon/gen/fwo/) with the appropriate weather station zone variable. i.e. Using "ftp://ftp2.bom.gov.au/anon/gen/fwo/%s.txt" as the URL to parse. For Sydney (Zone IDN10064, which would be used as %s) - currently the code would point to: http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDN10064.txt However this is now a HTML forecast (despite the URL ending with .txt!), which causes the issue noted above... by pointing the code to the new URL to parse: ftp://ftp2.bom.gov.au/anon/gen/fwo/IDN10064.txt The plain text version of the forecast can be used without any modification to the other functions/aspects of the code. ----------------------------------- Patches - Untested! ----------------------------------- Please see the attached "weather-bom.c" which includes the suggested fix (i.e. patched version). Note it will need to be/should be tested by someone who knows how to recompile the libgweather source. ----------------------------------- Notes ----------------------------------- * This bug has also been reported on launchpad for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libgweather/+bug/629646 It was reported here since all distributions of GNOME using the current bom.gov.au for data parsing will be affected. * Note that some locations may not yet experience the issue since BOM are in the process of migrating numerous locations to HTML formatted forecasts. It would be a better idea to point to the actual plain text documents as noted above however since the existing URL's format can change at any time. * Thank you to whoever fixes this - it's a small but annoying bug that when fixed should benefit all Australian users of libgweather/weather-applet - so I'm sure it will be much appreciated when fixed! Cheers! --------------------------------------------------------------------------------------------------------- System information --------------------------------------------------------------------------------------------------------- Description: Ubuntu 10.04.1 LTS Release: 10.04 libgweather-common: Installed: 2.30.0-0ubuntu1 Candidate: 2.30.0-0ubuntu1 Version table: *** 2.30.0-0ubuntu1 0 500 http://ftp.iinet.net.au/linux/ubuntu/ lucid/main Packages 100 /var/lib/dpkg/status ---------------------------------------------------------------------------------------------------------
Created attachment 169852 [details] [review] weather-bom.c patch
I am attaching a patch which works for me.
I can confirm this on Fedora 13. I can't confirm the patch fixes it but it's worth a try as it's currently not working. ;-]
I can confirm that this has been going on during both GNOME 2.30 and now GNOME 2.32 at (in my case) Sydney. AfC
I'd like to BEG that this minor fix is committed and a new version be made available ASAP, I've been suffering without this handy feature for quite a while now and it seems like the solution has been served up on the proverbial platter.
(In reply to comment #1) > Created an attachment (id=169852) [details] [review] > weather-bom.c patch I patched the libgweather-2-23.0 source with this patch, did a ./configure and then a "sudo checkinstall" but it still does not work for me. Did I miss something?
Review of attachment 169852 [details] [review]: Patch works for me (once I figured out that my compilation process put the new libs in /usr/local/lib rather than /usr/lib).
Hey David, Great to hear the patch works for you. What OS are you using? Would you mind posting instructions on how you implemented the patch? Whilst I am the author of this bug report and came up with a patch (though not as elegant as "Johnny"'s patch) - I have no actual idea how to implement it. I'm sure it will help all of those affected until (if?) the patch is committed/fixed.
This is what I used: http://askubuntu.com/questions/14271/instructions-on-how-to-recompile-the-libgweather-source You have to download and install piles of packages - as well as the libgweather source - to create the new .deb which is then installed. I then had to manually copy the new lib files as per my Review post.
Whoops, on Ubuntu 10.04.
This bug appears to be a duplicate of #619152. Neither bug appears to be seeing much action from the gnome-applets maintainers, however.
This patch works, would someone apply it upstream??
Yes confirmed as well that the patch works (Tested on Ubuntu 10.04) . As above could someone please upstream it??? Thank you
Still there in Ubuntu 11.10 - is there something stopping this TRIVIAL fix being implemented?
Comment on attachment 169852 [details] [review] weather-bom.c patch Unfortunately, there's no real active maintainer for libgweather at the moment, so this was waiting for way too long :/
I changed the code a bit to remove extra test we don't care about.
Thanks for finally committing this and promptly releasing it :)
Yes, wow, thank you Vincent Untz and anyone else who was involved (Tobias Mueller?)! Good to see that open source works, even if it took a tad over a year, the fact it can be resolved and has been is great :) Thank you again.
Bug seems to have returned to Ubuntu 15.10 using libgweather 3.16.1-1ubuntu1 No Australian forecast data for Melbourne location.