Summary: | "station not exist" with existent stations ... | ||
---|---|---|---|
Product: | [Unmaintained] kweather-kde3 | Reporter: | Damir Perisa <damir.perisa> |
Component: | general | Assignee: | geiseri |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | matija, mika.myllynen, msroest |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Session output from kweather
Display tab in applet config showing Unknown Station Weather Service tab in applet after station select change |
Description
Damir Perisa
2004-01-21 01:30:07 UTC
OS: Linux SuSE 9.0 KDE: 3.1.95 (3.2 RC 1) I CONFIRM this bug. I also upgraded to KDE 3.1.95 (3.2 RC 1) and find the same happening. Configured station KLEB, as usual, and KWeather claims "requested station does not exist". But it really exists. If you click "update now" same happens. Click "show report" and a recent report shows up. This bug did not exist in KDE 3.1.5. I've seen it too. At every KDE loading, KWeather reports "Station does not exist". However, both stations configured exist and are loaded properly. It doesn't report error on Update Now for me. > It doesn't report error on Update Now for me.
same for me: if you update manually (Update Now), the error do not come up
upgraded to kde 3.2.0 release --- bug not longer present resolve solved, please, if you don't have it too thanx or better ... i'll resolve feel free to open it again, if error comes again This does not work. Some stations, like LFSB work only after LogOut / LogIn. Other Stations like UNNN (Novosibirsk) don't work at all. reopen, because it's like #6 said sorry for this closing/reopening I see this problem with KDE3.2 release. When I add KWeather to the panel and configure EGLC as my weather station I get a popup saying the station code is invalid but the configuration dialog correctly updates and shows the weather status. When I restart the applet it works fine. I confirm the same behavior as the initial report - icon shows clouds and question mark, "Update Now" reports station does not exist, display report shows report for correct station. (Station is KMKC). I found that YaST System Update had not updated the kdebase packages. I was able to update these packages using YaST Install, and this resolved the KWeather problem as well as problems with KMail and Konqueror. I am using KDE 3.2.0 (Gentoo) with KWeather 2.1.0 and have the same problem with weather station 'EEGL' (London Heathrow). After some network sniffing I found the following: KWeather queries weather.noaa.gov correctly with .../stations/EGLL.TXT with the 'If-Modified-Since' flag set and receives a '304 Not Modified response'. After that it queries the same server with .../stations/NONE.TXT and gets a '404 Not Found' reply -> error message pops up. Clicking on the applet icon in kicker doesn't cause any network traffic and shows the correct weather station information. The applet icons just shows the question mark. In addition I get these annoying "The requested station does not exist!" popups every time the status is requested. I commited a change to CVS that fixed this problem for me. Is anyone still able to reproduce after updating to CVS 02/29/04 or newer? Bug does, indeed exist in 3.1.5. This applet was updated from Debian-unstable yesterday. It now has the problem. Note that the lookup site will not let me search (permissions messed up??). MAY be firewall related but firewall (Guarddog) had the same settings yesterday before the upgrade. Turning off firewall did not help. Using KDE3.2.1 (debian) and have the same problem with the popup and icon showing a question mark when using station EGVN. Solved the problem by removing Kweather from the taskbar after configuring it for EGVN and then adding Kweather to the task bar for a second time. Now no pop-ups and the icon displays the correct values. Fix in comment #14 worked for me as well. But it's still a pretty annoying little "feature" Bug still exist in KDE-3.2.2, just like said, after entering ICAO code popup appears saying station doesn't exist. Report however works, and after restarting applet the applet icon starts working. I have one in the config "YBBN" (brisbane, .au) ... ethereal reveals that its doing _two_ GET's ... one for http://weather.noaa.gov/pub/data/observations/metar/stations/YBBN.TXT which results in a 403 (not modified) ... but then later it does a request for http://weather.noaa.gov/pub/data/observations/metar/stations/.TXT . Why? hmmmm ... i just redid the config ... i think someone should have a look for bugs that may arise. Making sure that the config diag doesn't dup things ... makes sure the config file is right and stuff After normal instalation in KDE 3.2 BRANCH >= 20040204 (Mandrake 10.0) it does`nt recognize any station. After uninstalation and another installation does Kweather recognize all stations normall. Same as comment #14 [in KDE 3.2.3] Same as comment #16 except I had to restart KDE not just the the applet but maybe thats basically the same thing. running KDE 3.2.3 (mandrake) KDE 3.2.3 (gentoo's revision 1) ; Gentoo same error Bug still there. Not only does it show the error, it doesn't update the panel icon, even though it updates the report. Removing,adding the aplet basically worked, but a quick edit through ~/.kde/share/config/KWeatherServicerc to remove any whitespaces or wrong entries seem to help too I am running KDE from CVS HEAD on a full installation (not an upgrade) of Fedora Core 2. I get the "?" in the applet itself. But unlike some others, I have no way to get the correct weather: Update Now, Show Report - don't work for me. Can confirm lots of kweather weirdness with recent CVS HEAD update. 1) panel icon never updates (always cloudy ? icon) 2) repeated "Station does not exist" warnings 3) report indicates "station reports it needs maintenance" 4) Preferences always set to "Show icon, temperature, wind and pressure information" any attempt to change it from this and save fails. 5) Icons in "Weather Service" selected stations list appear to update correctly when Update All clicked. Configure Weather is broken. Before I deleted both config files, KWeatherServicerc and weather_panelappletrc, existing stations WOULD show as a selection in Configure/Display/Location, but would not work. I then deleted both config files thinking something changed in the internal format. Then: 1) If I add stations in Weather Service, they do not show in Display/Location. It just shows Unknown Station. 2) Even if I select update all in the Weather Service, the station names do not show as in the Display/Location area. 3) My longtime station KTTN no longer works, although it's in the noaa database. kweather worked fine in the 20041104 CVS, but with the end of November, it stopped working all together. I know kicker had a bunch of changes made to it. Could it be related? Or did some code in kweather change. Is a regression in order? For my local station, anyway..... It appears that kweather is attempting to retrieve a page with weather using the long name, not the weather code. I have attached a text output from kweather, but summarize the results here: http://weather.noaa.gov/pub/data/observations/metar/stations/TRENTON,%20MERCER%20COUNTY%20AIRPORT.TXT does not work. Nor does this kio_http: (27913) GET /pub/data/observations/metar/stations/TRENTON,%20MERCER%20COUNTY%20AIRPORT.TXT HTTP/1.1 This ftp site does ftp://weather.noaa.gov/data/observations/metar/stations/KTTN.TXT and shows the desired results 2004/12/13 19:53 KTTN 131953Z AUTO 28016G22KT 10SM BKN065 06/M05 A2963 RMK AO2 SLP030 T00611050 It appears that kweather is not using the stored code. Also, maybe related, the display stations does not pick up all the stations that are configures. The attachment kweather.txt shows an entire retrieval session. Hope this helps resolve this annoying bug!!! Created attachment 8651 [details]
Session output from kweather
Shows how kweather is sending the long string name for weather station instead
of station code. Also shows unreachable websites.
Further update. Starting kweatherservice from konsole works, and retrieves proper information. Running kweatherreport STATION_ID shows proper report for requested station. Running Weather Applet is borked. Nothing works. peter@mars:$ kweatherservice KWeatherService: starting dcopservice kweatherservice: Starting new service... kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-peter/ksycoca kweatherservice: Copying http://weather.noaa.gov/pub/data/observations/metar/stations/KTTN.TXT to file:///tmp/kde-peter/KWeatherServiceCzJ9ga-weather kweatherservice: Sending updating for KTTN kweatherservice: Current Time: Thursday 16 December 2004 06:38 am Update at: Thursday 16 December 2004 06:38 am ... peter@mars:$ kweatherreport KTTN kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-peter/ksycoca kweatherservice: Get the current weather icon.. kweatherservice: Returning KTTN kweatherservice: station, lat, lon, time: KTTN 40-16-35N 074-48-59W 07:15:41 kweatherservice: station, lat, lon, time: KTTN 40-16-35N 074-48-59W 16:34:33 reportview: Size 30,100 reportview: Size 26,96 kparts: KPart::slotWidgetDestroyed(), deleting part unnamed kparts: 0x8133a48 emitting activePartChanged (nil) kparts: Part::~Part 0x80ee338 See also 94970. The entire process of selecting stations from within the applet is not working -- therefore neither is the weather report. This is the weather_panelappletrc file that causes an "Unknown Station" error. [General Options] log_file_name= logging=false report_location=Trenton, Mercer County Airport reportview_size=450,325 smallview_mode=3 Manually changing the report_location variable to the STATION_ID permits kweather to function properly. So that, this file works for me: [General Options] log_file_name= logging=false report_location=KTTN reportview_size=450,325 smallview_mode=3 For some reason, the weather applet is writing the long descriptive name to weather_panelappletrc instead of the STATION_ID that was retrieved. It appears that to resolve this bug, we must find the code that writes this file and make sure that STATION_ID, not the station long name gets written out. I was able to recreate the error by adding a new station, quitting the panel applet and restarting it. Then, my weather_panelappletrc file looked like this: [General Options] log_file_name= logging=false report_location=New York, Kennedy International Airport reportview_size=450,325 smallview_mode=135840400 There is a problem changing the station on the fly. No matter which station I selected WHILE kweather was running, I could not change it. Only after quitting could I get either an error or the station I wanted. Lots of problems here still, but the bottom line is: to manually make this work, change report_location and don't select anything else through config. I think it's very broken. Updated CVS with fixes 20041220. Problems persist. Starting with a working configuration. When I change from station A to station B, kweather reports unknown station. weather_panelappletrc shows NO reportlocation: [General Options] log_file_name= logging=false report_location= reportview_size=450,325 smallview_mode=3 KWeatherServicerc still shows both: [WEATHERSTATIONS] stations=KTTN,KJFK Next,If I go to configure/Display, the list of locations shows Unknown Station and Station 2. Station 1 is removed from the list even though it shows on the WeatherService tab. CHanging stations in the Display tab has no effect and kweather continues to report an error. Only fix is to quit applet and edit the weather_panelappletrc file so that report location shows the station I want. Next, as soon as I did change (or try and change) the station, the display on the Weather Service tab became distorted. Only a restart of the application would fix it. Three screenshots follow. 1) Display tab after an attempted change of Location showing Unknown station. 2) Distorted display of Weather Service Tab after a station change. Created attachment 8735 [details]
Display tab in applet config showing Unknown Station
Initially, the drop down list shows both stations. After selecting station 2,
station 1 becomes Unknown. At this point, no station can be selected as both
show as unknown. appletrc file must be manually edited to regain functionality.
Created attachment 8736 [details]
Weather Service tab in applet after station select change
This image shows what happens to the Weather Service tab after a station select
change has occurred. Note how the size of the selection boxes shrinks
dramatically to approx 1/2 width and 1/4 height. Even after killing the applet
and processes, the problem persists. Probably need to kill KDE and restart.
I cannot duplicate #1, and #2 is a separate bug. Remove the config files and start over. This is a completely unrelated bug to what you have been talking about. The real bug was the drop down box was never finished. It was just finished last night. I'll close this in a few hours baring me being able to duplicate any of the behavior your talking about. 1) Removed weather applet from panel 2) quit KDE 3) Removed KWeatherServicerc and weather_panelappletrc 4) restarted KDE 5) Add weather applet Results 1) Config window pops up 2) Add station in Weather Service 3) Goto Display tab 4) Drop Down list empty 6) error appears about cannot find data for unknown station 6) remove applet from panel and restart 7) Unknown Station in drop down list. Requested station in Weather Service 8) Station IS written to KWeatherServicerc file 9) Stasion is NOT written to weather_panelappletrc file. report_location= is empty. For me, only way to get kweather to work is to force STATION_ID into weather_panelappletrc and NOT to touch config. It's been working in kde-3.4.*, but all three of kde-3.5* (beta1 beta2 rc1) that I have tried have dysfunctional kweather. It seems as if this problem has come back somehow (BTW, I had a fresh ~/.kde for the 3.5 version, and have just now tried it on a completely empty homedir, so it's not a carried-over config problem). Add the kweather applet to the taskbar. Right-click for "configure kweather". Find that it's impossible just to write in the station code. Go to the other tab: find the station, put it in "selected", update -- then the icon shows that it's updated ok. Go back to first tab: still can't see or select this station in the list. Close window: click on applet, do "update" on applet: just get respectively the "needs maintenance" or "doesn't exist" message. I found that the file .kde/share/config/weather_panelappletrc had its report_location variable empty: setting this to my station, then removing and reinstating the applet made everything work fine, and the station then appeared in the drop-down list on the first configure-window tab. So, I suggest there is again this bug with the weather-service not setting up the panel-applet config. I thought it was rather better anyway when one could just write the four-letter code into the first tab of the kweather configuration window: if the current way can't be made to work, would you at any rate make it possible to put in a code manually in the configure window, so others don't have to come this far to find how to avoid the problem! Same as previous. KDE 3.5.1 (the same in previous versions). I could get it work, but using a strange way. -Install applet -Choose a station -close the configuration pane -right click on the applet, and choose "refresh" -open the configuration pane again -now, you can choose the station in the combobox -close the pane - now, the applet works ->So, this a signal/slot problem : the list of the stations should refresh automatically the combobox to choose the station to display Another problem : this message "Station reports that it needs maintenance\n Please try again later" is bad, because it is displayed when no station is selected. Another problem : there is no bugreport button ;-) Gerard I reinstalled Kubuntu with KDE 3.5.1 and now Kweather will not keep the weather station option location. I select my city, hit apply, and close. I then get the message that this station does not exist. When I open the configure menu again the location is set to unknown station. To get it to work I followed the procedure similiar to Peter Haymen's. Select your city in the the applet, update and close. Remove applet from menu bar. Edit the KWeatherServicerc and get the 4 letter code in the stations value, save and close. Then open weather_panelapptrc and put the same 4 letter code in the locations value. Save and close. Add the applet back to the menu bar and it should show the new location. I am running Gentoo with KDE 3.4.3. As #38: I select my city, hit apply, and close. I then get the message that this station does not exist. When I open the configure menu again the location is set to unknown station. My Workaround: I've added one additional random city and selected my city. This behaviour is strange. I also have this problem now. I enter Farmingdale, NY as a weather station, then click "Update all" and weather updates. I hit OK and close out of the config panel. If I right-click on the applet & select "Update Now" it says station does not exist. If I open the kweather panel again and go to "Display," It says "Unknown Station" and does not give me the option to select my weather station unless I have added more than one station in the "Weather Service" setup screen. After I have added two stations, only one shows up in the "Display" screen. If I have a total of three stations, only two will show up in "Display." It does not appear that the "Display" page is working correctly, because even if I select a station and click OK, the change doesn't "stick." Got the latest Kweather 2.1.0 and am using KDE 3.5.1 SVN commit 616273 by mkoller: BUG: 124754 BUG: 138047 BUG: 136683 BUG: 126296 BUG: 113828 BUG: 122850 BUG: 118458 BUG: 116375 BUG: 103887 BUG: 76300 BUG: 73093 Long standing bug: make selection of a station work M +6 -2 dockwidget.cpp M +47 -10 kcmweather.cpp M +1 -2 kcmweather.h M +4 -0 kcmweatherservice.cpp M +22 -13 kweather.cpp M +1 -0 kweather.h M +20 -6 prefdialogdata.ui --- branches/KDE/3.5/kdetoys/kweather/dockwidget.cpp #616272:616273 @@ -47,7 +47,8 @@ void dockwidget::setLocationCode(const QString &locationCode) { - m_locationCode = locationCode; + m_locationCode = locationCode; + showWeather(); } void dockwidget::setViewMode(int _mode) @@ -82,7 +83,7 @@ QString wind = "?"; QString pressure = "?"; - if ( m_weatherService->stationNeedsMaintenance( m_locationCode ) ) + if ( !m_locationCode.isEmpty() && m_weatherService->stationNeedsMaintenance( m_locationCode ) ) { tip = i18n("Station reports that it needs maintenance\n" "Please try again later"); @@ -111,6 +112,9 @@ // On null or empty location code, or if the station needs maintenance, this will return the dunno icon. QPixmap icon = m_weatherService->icon( m_locationCode ); + if ( ! m_locationCode.isEmpty() ) + tip = m_weatherService->stationName( m_locationCode ) + "\n" + tip; + QToolTip::remove(m_button); QToolTip::add(m_button, tip); --- branches/KDE/3.5/kdetoys/kweather/kcmweather.cpp #616272:616273 @@ -83,17 +83,51 @@ { delete mWeatherService; } -void KCMWeather::focusInEvent(QFocusEvent *) +void KCMWeather::showEvent( QShowEvent * ) { fillStationList(); } void KCMWeather::fillStationList() { + // store current selection + QString current = mWidget->m_reportLocation->currentText(); + + mWidget->m_reportLocation->clear(); + QStringList stationList = mWeatherService->listStations(); QStringList::Iterator idx = stationList.begin(); + + // get station name from station id for sorting afterwards for(; idx != stationList.end(); ++idx) - mWidget->m_reportLocation->insertItem(mWeatherService->stationName(*idx)); + *idx = mWeatherService->stationName(*idx); + + stationList.sort(); + + idx = stationList.begin(); + for(; idx != stationList.end(); ++idx) + mWidget->m_reportLocation->insertItem(*idx); + + // restore previous selection + if ( current.isEmpty() ) + { + // nothing defined yet; show this situation to the user, otherwise + // he will see the first available setting which is not what he selected to view + mWidget->m_reportLocation->insertItem(""); + mWidget->m_reportLocation->setCurrentText(""); + } + else + { + for (int i = 0; i < mWidget->m_reportLocation->count(); i++) + if ( mWidget->m_reportLocation->text(i) == current ) + { + mWidget->m_reportLocation->setCurrentItem(i); + break; + } + } + + if ( current != mWidget->m_reportLocation->currentText() ) + reportLocationChanged(); } void KCMWeather::changeViewMode( int mode ) @@ -102,11 +136,6 @@ emit changed( true ); } -void KCMWeather::processURL( const QString &url ) -{ - kapp->invokeBrowser( url ); -} - void KCMWeather::enableLogWidgets( bool value ) { mWidget->m_logFile->setEnabled( value ); @@ -135,7 +164,10 @@ QString loc = config.readEntry( "report_location" ); mWidget->m_logFile->setURL( config.readPathEntry( "log_file_name" ) ); - mWidget->m_reportLocation->setCurrentText( mWeatherService->stationName( loc ) ); + + if ( ! loc.isEmpty() ) + mWidget->m_reportLocation->setCurrentText( mWeatherService->stationName( loc ) ); + mWidget->m_viewMode->setButton( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) ); changeViewMode( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) ); emit changed( false ); @@ -149,8 +181,13 @@ config.setGroup( "General Options" ); config.writeEntry( "logging", mWidget->m_enableLog->isChecked() ); config.writeEntry( "log_file_name", mWidget->m_logFile->url() ); - // Station idx to local idx - config.writeEntry( "report_location", mWeatherService->stationCode( mWidget->m_reportLocation->currentText() ) ); + + // Station idx to local idx; if nothing selected yet, keep it empty + QString loc; + if ( ! mWidget->m_reportLocation->currentText().isEmpty() ) + loc = mWeatherService->stationCode( mWidget->m_reportLocation->currentText() ); + config.writeEntry( "report_location", loc); + config.writeEntry( "smallview_mode", mViewMode ); config.sync(); --- branches/KDE/3.5/kdetoys/kweather/kcmweather.h #616272:616273 @@ -41,10 +41,9 @@ protected: void fillStationList(); - void focusInEvent( QFocusEvent * ); + virtual void showEvent( QShowEvent * ); private slots: - void processURL( const QString& ); void enableLogWidgets( bool value ); void changeViewMode( int mode ); void reportLocationChanged(); --- branches/KDE/3.5/kdetoys/kweather/kcmweatherservice.cpp #616272:616273 @@ -43,6 +43,10 @@ { QVBoxLayout *layout = new QVBoxLayout( this ); mWidget = new ServiceConfigWidget( this ); + + // not needed, as a change immediately changes the service + //connect(mWidget, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + layout->addWidget( mWidget ); KAboutData *about = new KAboutData( "kcmweatherservice", I18N_NOOP( "KWeather Configure Dialog" ), --- branches/KDE/3.5/kdetoys/kweather/kweather.cpp #616272:616273 @@ -52,7 +52,7 @@ QWidget *parent, const char *name): KPanelApplet(configFile, t, actions, parent, name), weatherIface(), mFirstRun( false ), mReport( 0 ), mClient( 0 ), - mContextMenu( 0 ), mWeatherService( 0 ) + mContextMenu( 0 ), mWeatherService( 0 ), settingsDialog( 0 ) { kdDebug(12004) << "Constructor " << endl; setObjId("weatherIface"); @@ -146,32 +146,41 @@ } /** prefs */ -void kweather::preferences(){ +void kweather::preferences() +{ kdDebug(12004) << "prefs" << endl; savePrefs(); - static KCMultiDialog *dlg = 0; + if ( settingsDialog == 0 ) + { + settingsDialog = new KCMultiDialog( this ); + connect( settingsDialog, SIGNAL( configCommitted() ), SLOT( slotPrefsAccepted() ) ); - if ( dlg == 0 ) { - dlg = new KCMultiDialog( ); - connect( dlg, SIGNAL( configCommitted(const QCString&) ), SLOT( slotPrefsAccepted() ) ); - - dlg->addModule( "kcmweather.desktop" ); - dlg->addModule( "kcmweatherservice.desktop" ); + settingsDialog->addModule( "kcmweather.desktop" ); + settingsDialog->addModule( "kcmweatherservice.desktop" ); } - dlg->show(); - dlg->raise(); + settingsDialog->show(); + settingsDialog->raise(); } /** The help handler */ -void kweather::help(){ +void kweather::help() +{ kapp->invokeHelp(QString::null, QString::fromLatin1("kweather")); } /** Display the current weather report. */ -void kweather::doReport(){ +void kweather::doReport() +{ + if ( reportLocation.isEmpty() ) + { + // no station to display defined -> open settings dialog + preferences(); + return; + } + kdDebug(12004) << "Showing out the report" << endl; if ( mReport == 0 ) { --- branches/KDE/3.5/kdetoys/kweather/kweather.h #616272:616273 @@ -77,6 +77,7 @@ //DCOPRef *mWeatherService; KPopupMenu *mContextMenu; WeatherService_stub *mWeatherService; + KCMultiDialog *settingsDialog; }; #endif --- branches/KDE/3.5/kdetoys/kweather/prefdialogdata.ui #616272:616273 @@ -27,12 +27,6 @@ <height>0</height> </size> </property> - <property name="maximumSize"> - <size> - <width>640</width> - <height>480</height> - </size> - </property> <property name="focusPolicy"> <enum>TabFocus</enum> </property> @@ -83,6 +77,20 @@ <property name="name"> <cstring>m_reportLocation</cstring> </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> </widget> <spacer> <property name="name"> @@ -284,4 +292,10 @@ </includes> <layoutdefaults spacing="3" margin="6"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<includehints> + <includehint>kcombobox.h</includehint> + <includehint>kurlrequester.h</includehint> + <includehint>klineedit.h</includehint> + <includehint>kpushbutton.h</includehint> +</includehints> </UI> |