Bug 54247

Summary: kweather not update current weather status
Product: [Applications] kweather-kde3 Reporter: Vlad <vvy>
Component: generalAssignee: geiseri
Status: RESOLVED WORKSFORME    
Severity: major    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: This will fix the icon problems, letency on opdates and reduce network packets.

Description Vlad 2003-02-07 14:30:21 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Debian testing/unstable Packages
OS:          Linux

If I login under root, kweaterservice starting automatically and if I specify icao code, I can see current weather state, but after that not happen update data in kweater applet(in case manual command or sheduled). I see a log files in my squid, I can see at once request for URL 
http://weather.noaa.gov/ bla-bla/<ICAO-cod>.TXT. After that kweather not requested anything.

If I login by ordinary user, kweatherservice not starting. If starting kweatherservice manual, all working like under root.

In additional, I think it heppen because cache of konqueror, and remove all in cache. Problem not disappeared.
Comment 1 Remko Scharroo 2003-02-14 18:10:50 UTC
I can confirm that I encounter the same problem.  
RedHat 7.3 (all updates till 10 Feb 2003), KDE 3.1 (ASPLinux)  
Offending package: kdetoys-3.1-0.74asp.i386.rpm  
  
It is very easy to reproduce. Just start the kweather applet on your machine and  
you'll get the weather report alright. Come back 2 hours later and force update. No  
update will be collected. Go to another machine and go to the same weather station,  
and you'll see a newer update is available. 
 
Attempts to solve the problemm i.e. to get the weather reports updated: 
1) Restart kweather applet: problem remains 
2) Load other weather station and return to original: problem remains 
3) Empty konqueror cache: problem remains 
4) Log out and log in: problem remains 
5) Reboot: problem remains 
6) Log in as other user: other user gets new update but not the original user 
 
Hope this additional info helps solving the bug. 
Comment 2 Christian Loose 2003-03-28 10:47:18 UTC
Hi,

Is this bug still reproducable with the current KDE 3.1.1 version? There were a 
lot of bugs fixed for that version.

What weather station did you use?

Thanks for your reports,

Christian
Comment 3 Rex Dieter 2003-03-28 16:17:43 UTC
FYI, I've seen kweather not update too, but it always turned out that the weather source I was 
using hadn't updated their data. 
Comment 4 Vlad 2003-03-31 12:12:00 UTC
Subject: Re:  kweather not update current weather status

Hi Christian.
Yes. This bug not disappear in KDE 3.1.1. But disappear part of this bug. Now 
when I start applet kweatherservice started automatically, but not updating 
current weather data. 
I try use a many ICAO from Ukraine: ukkk ukdd ukbb ukhh. Additionally I'm 
using kde-i18n-ru package. Now I check this weather stations directly from 
web site. So on web site information was changed, but in applet still show 
from first update.
I try change user profile without  translation package, with default language, 
still the same.
In logs of squid, I'm cannot see requests sended to http://weather.noaa.gov/ 
after first update in manual update also.

Comment 5 geiseri 2003-06-06 02:17:50 UTC
Subject: Re: kweather not update current weather =?iso-8859-1?q?status

?=
Date: Thu, 5 Jun 2003 20:17:48 -0400
User-Agent: KMail/1.5.9
MIME-Version: 1.0
Content-Disposition: inline
X-KMail-Fcc: sent-mail
X-KMail-Identity: 1355532421
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <200306052017.48767.geiseri@kde.org>
Status: RO
X-Status: Q
X-KMail-EncryptionState:  
X-KMail-SignatureState:  
X-KMail-MDN-Sent:  

=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey, could you guys check this bug again?
Is it because the file is not there?  Is it because its not updated?

We are working on a new chooser to more acuretely reflect what data is ther=
e.

Thanks
	-ian reinhart geiser

=2D --=20
=3D=3D=3D+<KWeather for KDE 3.1>+=3D+<http://www.kde.org>+=3D=3D=3D
   Report for Wednesday 04 June 2003 08:54 am
   11=B0C with winds at 9 km/h NE and 6.4km of visibility.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D+<geiseri@kde.org>+=3D=3D=3D
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+392sPy62TRm8dvgRAqYvAJ9bBryc0ykcTfRnllGMlRF0ZU7g0gCgnzle
O5eMnsFEq++IPB0H+o9Ctck=3D
=3DEpVt
=2D----END PGP SIGNATURE-----

Comment 6 Moritz Moeller-Herrmann 2003-09-08 14:13:34 UTC
I can confirm the bug for current (09082003) CVS. I set a station and I get a correct report, if I 
let kweather show a report, but the icon is still showing unknown status. Readding kweather 
showed correct status for me. BTW, the GUI for setting stations is weird. Why are there two 
places to set stations? 
Comment 7 Stefanos Harhalakis 2003-09-14 16:12:57 UTC
I'm not sure if this is related but kweather uses my proxy to connect to the server. 
Since I'm using squid as a caching proxy there are no updates for hours because squid 
returns the same data again and again. 
 
From the squid logs: 
 
127.0.0.1 - - [14/Sep/2003:17:13:16 +0300] "GET http://weather.noaa.gov/pub/data/
observations/metar/stations/LGTS.TXT HTTP/1.1" 304 207 TCP_IMS_HIT:NONE 
 
This gets fixed if squid cache is cleaned.... 
 
An option to bypass proxy should solve this problem. 
 
<<V13>> 
 
Comment 8 Moritz Moeller-Herrmann 2003-09-15 10:08:02 UTC
I have experienced the same problems. Obviously many ICAO codes from German locations 
have no representation in the US-American webpage accessed. So only very few of the ICAO 
codes that can be found are working. (None of the 8 ICAO codes near Mannheim among 
them). 
 
Kweather does not give a meaningful error message or other feedback, but claims that the 
ICAO code is wrong. This is false. The error message has to be improved. Failed attempts are 
not even logged, if you specify a log file. 
 
Until this is fixed, I would not ship kweather, but put it into kdenonbeta. 
Comment 9 Hasso Tepper 2003-11-25 10:34:13 UTC
I'd vote for not to ship kweather in current state with 3.2 as well. Btw, it makes kontact weather plugin unusable as well. Kontact summary view crashes at the moment if kweather is installed.

Even if it will be fixed (there is still time for that) I don't know what to do with database. Obviously database in webpage is out of date. It doesn't contain many codes and some of them are just wrong (Tallinn for example - see #57770). I added Estonian codes to the translation of documentation. But it was easy, Estonia is very small country.

And what about stations.dat file? Even if I know correct code of Tallinn, kweather will not show name of city because it's missing from stations.dat file. Should we maintain our own database in stations.dat file with uptodate info and rely on it when choosing ICAO code? What's format of this file?
Comment 10 Enrico Ros 2004-01-06 11:01:57 UTC
Created attachment 3994 [details]
This will fix the icon problems, letency on opdates and reduce network packets.

In fact what exposed on comments above are several problems not only one.
If I can I'll rewrite some parts of the applet and weather server to polish it
after 3.2 is out.
In the patch I attach here the "no icon is shown" bug will disappear and I'd
like if you can report if it fixes the other problems.
Comment 11 az303 2004-02-12 04:18:15 UTC
I have the same problem on KDE 3.2 with Kweather 2.1.0 on a Slackware-current system.  The first time you run Kweather everything works.  It doesn't get any further updates after that, however if you delete the weather information file from /var/tmp/kdecache-root/http/e/weather.noaa......etc. then the "Update Now" button works again (once) and then doesn't work until the cached weather info is deleted again.  It doesn't seem to want to overwrite the cached weather file.  This is probably not a kweather problem, but something in the KDE cacheing code. 

Hope this helps,
M.K.
Comment 12 Agripino Petit Miguel 2004-02-16 12:27:20 UTC
I've got the same problem, and the only thing that seems help is, as suggested by M.K (thank you) is to periodically remove the KDE cache for the weather service:
rm /var/tmp/kdecache-"myUser"/http/e/weather.noaa.gov_pub_data_observations_metar_stations_*

Hint: I've observed that (for the weather station I'm interested in) the weather information is updated every 1-2 hours and at XY:00 or XY:30, so, I remove it in my crontab file every 15 minutes, at XY:10, XY:25, XY:40 and XY.55
Comment 13 Agripino Petit Miguel 2004-02-16 12:45:41 UTC
Well, I have to admit that proper configuration for the Konqueror's cache seems also to work: keep cache synchronized   :-)
Comment 14 Waldo Bastian 2004-04-15 13:42:08 UTC
CVS commit by waba: 

Force reload when fetching weather data to make sure we by-pass any cache.
(BR54247)
CCMAIL: 54247@bugs.kde.org


  M +1 -0      weatherlib.cpp   1.81.2.1


--- kdetoys/kweather/weatherlib.cpp  #1.81:1.81.2.1
@@ -878,4 +878,5 @@ void WeatherLib::getData(Data *d)
 
                 d->job = KIO::file_copy( url, local, -1, true, false, false);
+                d->job->addMetaData("cache", "reload"); // Make sure to get fresh info
                 connect( d->job, SIGNAL( result( KIO::Job *)),
                         SLOT(slotCopyDone(KIO::Job *)));


Comment 15 Vlad 2005-04-20 16:43:10 UTC
This bug not appear long time. Because of it I decide clode this case