Skip Menu |

This queue is for tickets about the Weather-Com CPAN distribution.

Report information
The Basics
Id: 35681
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Weather-Com

People
Owner: SCHNUECK [...] cpan.org
Requestors: justice8 [...] wanadoo.fr
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: 0.5.5



Subject: Weather::Com::Base::_getWebPage fail cause of recent weather.com changes
weather.com server reply this error: "Bad or missing query parameters in request." (in Weather::Com::Base::_getWebPage sub) with query used: http://xoap.weather.com/weather/local/FRXX0076?unit=m&prod=xoap&par=AAAABBBCCC&key=DDDDEEEEFFFF it failed since weather.com announce major changes and issue a warning about license issue for automated querying tool (on may 6th).
The error was caused by a change of the TWCi XOAP API. There is one paramters in the HTTP request that was set from 'optional' to 'required'. As this parameter is never used from Weather-Com, you get this message. Quick fix: In 'Weather::Com::Base' goto line 100 and set $self->{LINKS} to '1'. # API specific attributes $self->{UNITS} = 'm'; # could be 'm' for metric or 's' for us $self->{CC} = 0; # show current conditions true/false $self->{FORECAST} = 0; # multi day forecast 0 = no, 1..10 days $self->{LINKS} = 1; # <==== THAT MUST BE 1 SINCE 06 MAY 2008 In the next release, the 'link' parameter will be set by default. Thanks for raising this BUG. Cheers, Thomas
As several other users of Weather-Com module reported the same 'bug' after I had closed this one, it is now re-opened until there's an official bug-fix release... This way, you learn how to use such systems and not to close a bug until you released a new version. ;-) Cheers, Thomas
The same problem seems to exist for the forecasts. Removing the following line $parameters{links} = 0; from the new constructor in Forecast.pm allows forecasts to work as well? Thanks to Kyle Hubert for finding and reporting that one. Cheers, Thomas
Thomas, Making the following change doesn't work for me: $self->{LINKS} = 1; I'm using 0.5.3. After looking at the forms and queries accepted by the weather.com website I commented the line 260 and this works for me: #$searchlocation .= '&prod=xoap'; Regards, -Urivan Flores
From: seitz [...] bsd-unix.net
On Tue Nov 18 12:33:12 2008, SAAIB wrote: Show quoted text
> Thomas, > > Making the following change doesn't work for me: > > $self->{LINKS} = 1; > > I'm using 0.5.3. > > After looking at the forms and queries accepted by the weather.com > website I commented the line 260 and this works for me: > > #$searchlocation .= '&prod=xoap'; > > Regards, > > -Urivan Flores
I can confirm this bug still exists. It was quite frustrating trying to figure out the issue between my Debian box and my FreeBSD box however after inspecting the Debian package I found it did the following which makes it function properly: (7:59pm) [seitz@renoir] [~/tmp/libweather-com-perl-0.5.3/debian/patches] Show quoted text
> cat 10_links.dpatch
#! /bin/sh /usr/share/dpatch/dpatch-run ## 10_links.dpatch by Christoph Haas <haas@debian.org> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad libweather-com-perl-0.5.3~/lib/Weather/Com/Base.pm libweather-com-perl-0.5.3/lib/Weather/Com/Base.pm --- libweather-com-perl-0.5.3~/lib/Weather/Com/Base.pm 2007-07-09 21:57:24.000000000 +0200 +++ libweather-com-perl-0.5.3/lib/Weather/Com/Base.pm 2008-05-29 20:44:06.000000000 +0200 @@ -97,7 +97,7 @@ $self->{UNITS} = 'm'; # could be 'm' for metric or 's' for us standard $self->{CC} = 0; # show current conditions true/false $self->{FORECAST} = 0; # multi day forecast 0 = no, 1..10 days - $self->{LINKS} = 0; + $self->{LINKS} = 1; # save params for further use $self->{ARGS} = \%parameters; Please advise!
Subject: FIXED: Weather::Com::Base::_getWebPage fail cause of recent weather.com changes
This has now been fixed. New version 0.5.5 available on CPAN. Cheers, Thomas