GoodWeather gdesklets can not handle more than 1 display.

Bug #834653 reported by Thies Thate
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gDesklets
New
Undecided
Unassigned
Fedora
Fix Released
Medium

Bug Description

Working with Fedora 15 Gnome3 I tried to have 3 gdesklets GoodWeather reports displaying at the same time:
1 for De Kooy NLXX0021
1 for Paris FRXX0076
and 1 for Dubrovnik HRXX0001

I start gdesklets program by adding this to gnome-session-properties.

After a new session login only the last activated GoodWeather display gives weather data, the first two displays are showing but without any weather data

Is it possible to have the three displays working at the same time?

Revision history for this message
In , Timur (timur-redhat-bugs) wrote :

Description of problem:
When I install the gdesklets-goodweather package to Fedora 14 and add the desklet to my desktop, it fails to load any data, regardless of what location I configure in it.

Reproducibility:
always

Steps to Reproduce:
1. install the gdesklets-goodweather package
2. add the desklet to the desktop
3. configure any location

Actual results:
It doesn't display any data, just says "loading" for forever.

Expected results:
It should display the actual weather data.

Solution:
After some searching on the net, I found out that weather.com changed the method to get weather data so this is why GoodWeather doesn't work.
To get it work, open /usr/share/gdesklets/Sensors/GoodWeather/__init__.py and change the declaration of WEATHER_SOURCE (beginning on line 42) to this one:

    WEATHER_SOURCE = "http://xoap.weather.com/weather/local/" \
                     "%(weather_code)s?cc=*&dayf=5&prod=xoap&" \
                     "link=xoap&par=1003832479&key=bb12936706a2d601"

After this change, the desklet starts to work correctly. I think it would be best to apply this to the current version found in the repo, so if would work for everyone.

Revision history for this message
In , Timur (timur-redhat-bugs) wrote :

Created attachment 476367
Patch to __init__.py that makes it work correctly.

I discovered another problem. The desklet fails to parse metric data (acquired with &unit=m in the URL), so I created a patch that fixes it by requesting data in fahrenheit. After this, the app is able to convert it successfully to celsius.

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

Created attachment 479754
Fix regular expressions, fix wind speed output

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

I debugged this problem as well and it turns out that it's not at all
a problem with celsius vs. fahrenheit.

Actually, the __init__.py script neglects to take negative values into account
in the regular expressions used to scan the weather data. This breaks the
entire matching routine. The reason that it works for you when using fahrenheit
is simply because the chance to get negative values is lower. If the
fahrenheit value drops below 0, the script will again start to fail.

However, if you add potential matches for + or - in the right spots, it works with all temperatures.

I attached a patch as well. It fixes the broken regular expressions. It
also fixes the "Wind Spped" string and it redefines the output for the wind
speed to add the wind direction as well. So that reads now

  W: 14 kph NE

instead of just

  S: 14 kph

Given that, I replaced the "W:" for the chill with a "C:" since that makes
more sense, IMHO. I also turned the order of high and low temperature of the
day since that order is more natural (day:night).

Btw., I also had the problem that the original WEATHER_SOURCE definition
didn't work for me. However, with the changes in my patch the original
WEATHER_SOURCE definition works for me again. Other than that, if the
WEATHER_SOURCE definition from the original report is preferred, I suggest
to take out the "prod=xoap&link=xoap&" substring. The only result of that
substring in the URL is to add advertisment to the output.

Hope that helps,
Corinna

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

Created attachment 479755
Replace "N/A" in temperature output with just a dash

Optional patch to replace the "N/A" string in the output
of temperatures with just a dash. The reason for this
patch is that the "N/A" string is overly outstanding and
takes too much room and attention. If a temperature is
not available it should be sufficient to leave the space
"almost" blank.

Corinna

Revision history for this message
In , Timur (timur-redhat-bugs) wrote :

Thank you Corinna for your work. Now if only we could ask the packager to include your patches.

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

Created attachment 479793
Take 2: Fix regular expressions, fix wind speed output, fix incorrect integer comparison

This is take 2 of the patch to fix the goodweather __init__.py
script. As it turned out, the script has another bug when it
compares the low and high temperature values. The variables
are strings, and the comparision neglects to convert the strings
to integer values before comparing them. This leads to the
unfortunate result that "-1" is less than "-7". This second
version of the patch is a replacement for patch 479754, which
additionally fixes the comparison of high and low by casting the
variables to int when testing them.

Corinna

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

What do we do with bug reports to apparently orphaned packages?

The problems reported in this bugzilla entry still exist in Fedora 15
and apparently nobody cares. I even wrote an email to the guy who
this bug report is assiged to, as well as to <email address hidden>
to ask how to move forward. I got no reply in both cases. Instead,
the entirly unchanged gdesklet-goodweather package made it into F15.

My former entries into this bugzilla entry contain all patches necessary
to fix the issues.

Corinna

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

Corinna,
I take over ownership of this package since I did not have a response of the original owner. Would you like to co-maintain this extension. Regards,

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

Hi Luya,

thanks for the offer, but I'm already maintaining quite a few
packages. I would be glad if my patches could go in to improve
the GoodWeather desklet, but I'm not feeling up to the task to
maintain yet another package.

Thanks,
Corinna

Revision history for this message
Bjoern Koch (h.humpel) wrote :

Well... you can have multiple GoodWeather Displays running at the same time. I have two of them running here.
The only problem: only one of them has a preference window...

I am not sure if there is a difference when running 3(+) instances of GW, but I will check this out later.
But I know/think that gDesklets might have troubles running with Gnome 3.....

Revision history for this message
Thies Thate (mthate90) wrote : Re: [Bug 834653] Re: GoodWeather gdesklets can not handle more than 1 display.

Thanks for your reaction,
I understand your multiple displays stay working after restarting a new
session. I hope you can find a solution for gnome 3.

I see the last installed weatherdisplay (of my three displays in one
session) is the preference display where I can reach 'Configure Desklet'.
Or do you mean something different with 'a preference window'.

Under Gnome-3 I can start more times a program in a diferent window. But I
don't know how to arrange this by setting the gnome-session-properties.

2011/8/26 Bjoern Koch <email address hidden>

> Well... you can have multiple GoodWeather Displays running at the same
> time. I have two of them running here.
> The only problem: only one of them has a preference window...
>
> I am not sure if there is a difference when running 3(+) instances of GW,
> but I will check this out later.
> But I know/think that gDesklets might have troubles running with Gnome
> 3.....
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/834653
>
> Title:
> GoodWeather gdesklets can not handle more than 1 display.
>
> Status in gDesklets:
> New
>
> Bug description:
> Working with Fedora 15 Gnome3 I tried to have 3 gdesklets GoodWeather
> reports displaying at the same time:
> 1 for De Kooy NLXX0021
> 1 for Paris FRXX0076
> and 1 for Dubrovnik HRXX0001
>
> I start gdesklets program by adding this to gnome-session-properties.
>
> After a new session login only the last activated GoodWeather display
> gives weather data, the first two displays are showing but without any
> weather data
>
> Is it possible to have the three displays working at the same time?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gdesklets/+bug/834653/+subscriptions
>

Revision history for this message
Thies Thate (mthate90) wrote :

(excuse if this has been sent twice. Some problem by answering via gmail
from evolution)

Thanks for your reaction,
I understand your multiple displays stay working after restarting a new
session. I hope you can find a solution for gnome 3.

I see the last installed weatherdisplay (of my three displays in one
session) is the preference display where I can reach 'Configure
Desklet'.
Or do you mean something different with 'a preference window'.

Under Gnome-3 I can start more times a program in a diferent window. But
I don't know how to arrange this by setting the gnome-session-propertie

On Fri, 2011-08-26 at 12:32 +0000, Bjoern Koch wrote:
> Well... you can have multiple GoodWeather Displays running at the same time. I have two of them running here.
> The only problem: only one of them has a preference window...
>
> I am not sure if there is a difference when running 3(+) instances of GW, but I will check this out later.
> But I know/think that gDesklets might have troubles running with Gnome 3.....
>

Revision history for this message
Thies Thate (mthate90) wrote :

I just tested gdesklets clock and found multiple installation (via the
gdesklets-daemon) of clock works good (answer warning: "There is a saved
instance of this display choose Red/No").
I installed three clocks each with an own clock face that comes back
also after a new gnome-3 session. You can still choose a different
clock face via 'configure desklet' separately per clock.

But doing this for "Goodweather display" for three different weather
stations only two stations come back in a new session with the weather
info, the other weather display is empty. And trying to change the
station via "configure desklet"is only possible from one display.

I enclose a screen shot of the situation after a new gnome session.

On Fri, 2011-08-26 at 12:32 +0000, Bjoern Koch wrote:
> Well... you can have multiple GoodWeather Displays running at the same time. I have two of them running here.
> The only problem: only one of them has a preference window...
>
> I am not sure if there is a difference when running 3(+) instances of GW, but I will check this out later.
> But I know/think that gDesklets might have troubles running with Gnome 3.....
>

Revision history for this message
Bjoern Koch (h.humpel) wrote :

OK, so I started a third instance of GoodWeather(-08) and all three are working fine. But only the desklet which has been started last can be configured (strange thing).
I guess that this is a problem of Sensors. GoodWeather(-08) is till using Sensors, and as we all know ;):
 -> Sensors are deprecated since gDesklets 0.30 and will be no more supported with gDesklets 0.40.

Unfortunately there is no other "good" Weather desklet out there... :/.

Anyway, back to your problem... what does the log say about it ?

Revision history for this message
Thies Thate (mthate90) wrote :

I installed in one session again the three displays. (answer warning:
"There is a saved instance of this display choose Red/No" did not
show).See attachment of screendump No log found.
After a new session all three displays came up but only the last
installed one (Dubrovnik) shows weather data (See attachment)
Now there is a log file which I enclosed.

On Sun, 2011-08-28 at 10:34 +0000, Bjoern Koch wrote:
> OK, so I started a third instance of GoodWeather(-08) and all three are working fine. But only the desklet which has been started last can be configured (strange thing).
> I guess that this is a problem of Sensors. GoodWeather(-08) is till using Sensors, and as we all know ;):
> -> Sensors are deprecated since gDesklets 0.30 and will be no more supported with gDesklets 0.40.
>
> Unfortunately there is no other "good" Weather desklet out there... :/.
>
> Anyway, back to your problem... what does the log say about it ?
>

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

Hi Luya,

I just saw that the package is still unchanged for Fedora 16.
Is there any problem why my patches so that they can't go in
to improve the GoodWeather desklet? The patches are pretty
straightforward and can be applied cleanly to the current sources.

Corinna

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

Hi Corinna,
Sorry for the long delay because I had other priority and lost track about change after cleaning my email. Your patches work greatly. Updates will come shortly.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-7.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/gdesklets-goodweather-0.31-7.fc15

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/gdesklets-goodweather-0.31-7.fc16

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-7.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdesklets-goodweather-0.31-7.fc14

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Package gdesklets-goodweather-0.31-7.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gdesklets-goodweather-0.31-7.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15565
then log in and leave karma (feedback).

Revision history for this message
In , Corinna (corinna-redhat-bugs) wrote :

Hi Luya,

the package works fine for me, but there is a packaging bug.
There are odd files called

  /usr/share/gdesklets/Sensors/GoodWeather/__init__.py.__init__.py
  /usr/share/gdesklets/Sensors/GoodWeather/__init__.py.__init__.pyc
  /usr/share/gdesklets/Sensors/GoodWeather/__init__.py.__init__.pyo
  /usr/share/gdesklets/Sensors/GoodWeather/weather.py.weather

They should be removed before moving from test into release.

Thanks,
Corinna

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-8.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gdesklets-goodweather-0.31-8.fc14

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-8.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/gdesklets-goodweather-0.31-8.fc15

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-8.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/gdesklets-goodweather-0.31-8.fc16

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-8.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Piscium (piscium-redhat-bugs) wrote :

The bug as described is fixed, thanks, however there is still an old bug, that also existed in F13 if not before: if I suspend the computer, and then wake it up, the weather desklet does not update the weather any more. It looks like the thread that does that somehow never wakes up. This is repeatable for me on i686. Any ideas?

The workaround is to right-click and choose "Restart desklet" - this works.

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

(In reply to comment #22)
> The bug as described is fixed, thanks, however there is still an old bug, that
> also existed in F13 if not before: if I suspend the computer, and then wake it
> up, the weather desklet does not update the weather any more.

Could you open a new bug report in regards? Thanks.

Revision history for this message
In , Piscium (piscium-redhat-bugs) wrote :

(In reply to comment #23)
> Could you open a new bug report in regards? Thanks.

Created bug #755162.

Thanks.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-8.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-goodweather-0.31-8.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.

Changed in fedora:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.