indicator-weather crashed with AttributeError in export_location_details(): Location instance has no attribute 'location_code'

Bug #821233 reported by robin0800
This bug affects 499 people
Affects Status Importance Assigned to Milestone
Weather Indicator
Fix Released
Undecided
Unassigned
raring-backports
Invalid
Undecided
Unassigned
indicator-weather (Baltix)
Fix Released
Medium
Mantas Kriaučiūnas
indicator-weather (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Undecided
Iain Lane
Quantal
Fix Released
Undecided
Unassigned

Bug Description

TEST CASE:
1. install indicator-weather, and run it from the commandline (or if you have it already, the guest session works too)
2. click on "Setup weather"
3. add a location and click on the wizard until "apply"
4. verify the crash

5. install the new version
6. repeat step 2,3 and verify that it does not crash anymore

On Oneiric Alpha3 on trying to set up this application at the apply stage

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: indicator-weather 11.05.31-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-7.9-generic 3.0.0
Uname: Linux 3.0.0-7-generic i686
Architecture: i386
Date: Fri Aug 5 03:16:15 2011
ExecutablePath: /usr/bin/indicator-weather
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110802.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/indicator-weather']
SourcePackage: indicator-weather
Title: indicator-weather crashed with AttributeError in export_location_details(): Location instance has no attribute 'location_code'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
robin0800 (robin-linux-hotmail) wrote :
tags: removed: need-duplicate-check
Changed in indicator-weather (Ubuntu):
status: New → Confirmed
visibility: private → public
Changed in indicator-weather (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Dave Vree (hdave) wrote :

Happening to me on a fresh installation of 12.04 x64

Revision history for this message
hightower (jonas-talent) wrote :

me too as well - fresh install of 12.04 x64 today.

tags: added: precise raring
Revision history for this message
Uco (ucomesdag) wrote :

/usr/bin/indicator-weather line 367: if (yahoo_woeid_result['ResultSet']['Error'] != 0) and (yahoo_woeid_result['ResultSet']['Results'] != None):

...replace ['Error'] != 0 with ['Error'] != '0' so it reads : if (yahoo_woeid_result['ResultSet']['Error'] != '0') and (yahoo_woeid_result['ResultSet']['Results'] != None):

This fixed it for me.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

I can confirm, thay ucomesdag proposal fixed crash when adding new location (city) in Weather indicator versions 11.11.28 and 12.07.30 :)
I'm attaching a patch, which can be applied against Ubuntu 12.04 and newer indicator-weather packages.

Uco (ucomesdag) wrote 16 hours ago: #4
> /usr/bin/indicator-weather line 367: if (yahoo_woeid_result['ResultSet']['Error'] != 0) and (yahoo_woeid_result['ResultSet']['Results'] != None):
> ...replace ['Error'] != 0 with ['Error'] != '0'

Changed in indicator-weather (Baltix):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mantas Kriaučiūnas (mantas)
tags: added: quantal
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for fixing crash when adding new location in Weather indicator" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
fred (fredonweb) wrote : Re: [Bug 821233] Re: indicator-weather crashed with AttributeError in export_location_details(): Location instance has no attribute 'location_code'

Thanks a lot !

2012/12/10 Mantas Kriaučiūnas <email address hidden>

> I can confirm, thay ucomesdag proposal fixed crash when adding new
> location (city) in Weather indicator versions 11.11.28 and 12.07.30 :)
> I'm attaching a patch, which can be applied against Ubuntu 12.04 and newer
> indicator-weather packages.
>
> Uco (ucomesdag) wrote 16 hours ago: #4
> > /usr/bin/indicator-weather line 367: if
> (yahoo_woeid_result['ResultSet']['Error'] != 0) and
> (yahoo_woeid_result['ResultSet']['Results'] != None):
> > ...replace ['Error'] != 0 with ['Error'] != '0'
>
> ** Patch added: "Patch for fixing crash when adding new location in
> Weather indicator"
>
> https://bugs.launchpad.net/ubuntu/+source/indicator-weather/+bug/821233/+attachment/3455982/+files/indicator-weather-crash-AttributeError-in-export_location_details.patch
>
> ** Also affects: indicator-weather (Baltix)
> Importance: Undecided
> Status: New
>
> ** Changed in: indicator-weather (Baltix)
> Status: New => In Progress
>
> ** Changed in: indicator-weather (Baltix)
> Importance: Undecided => Medium
>
> ** Changed in: indicator-weather (Baltix)
> Assignee: (unassigned) => Mantas Kriaučiūnas (mantas)
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1088179).
> https://bugs.launchpad.net/bugs/821233
>
> Title:
> indicator-weather crashed with AttributeError in
> export_location_details(): Location instance has no attribute
> 'location_code'
>
> Status in “indicator-weather” package in Ubuntu:
> Confirmed
> Status in “indicator-weather” package in Baltix:
> In Progress
>
> Bug description:
> On Oneiric Alpha3 on trying to set up this application at the apply
> stage
>
> ProblemType: Crash
> DistroRelease: Ubuntu 11.10
> Package: indicator-weather 11.05.31-0ubuntu2
> ProcVersionSignature: Ubuntu 3.0.0-7.9-generic 3.0.0
> Uname: Linux 3.0.0-7-generic i686
> Architecture: i386
> Date: Fri Aug 5 03:16:15 2011
> ExecutablePath: /usr/bin/indicator-weather
> InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386
> (20110802.1)
> InterpreterPath: /usr/bin/python2.7
> PackageArchitecture: all
> ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
> ProcEnviron:
> LANGUAGE=en_GB:en
> LANG=en_GB.UTF-8
> SHELL=/bin/bash
> PythonArgs: ['/usr/bin/indicator-weather']
> SourcePackage: indicator-weather
> Title: indicator-weather crashed with AttributeError in
> export_location_details(): Location instance has no attribute
> 'location_code'
> UpgradeStatus: No upgrade log present (probably fresh install)
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/indicator-weather/+bug/821233/+subscriptions
>

Revision history for this message
Michael Vogt (mvo) wrote :

I made a debdiff with the patch that should be ready for SRU. For me this was crashing reliable.

Please double check and if its good I will upload to quantal-proposed later.

Revision history for this message
Michael Vogt (mvo) wrote :

I uploaded the debdiff now to quantal-proposed and raring.

description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-weather - 12.07.30-0ubuntu2

---------------
indicator-weather (12.07.30-0ubuntu2) raring; urgency=low

  * fix crash when adding new location (LP: #821233)
    Thanks to Mantas Kriaučiūnas (mantas)
 -- Michael Vogt <email address hidden> Wed, 19 Dec 2012 16:41:12 +0100

Changed in indicator-weather (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in indicator-weather (Ubuntu Quantal):
status: New → Confirmed
Revision history for this message
Norman Rasmussen (normanr) wrote :

Could you do a backport for precise too, please.

Revision history for this message
Benjamin (nailartcenter) wrote :

Yes, affected me too in precise. After I added a new City and close the settings, than got a apport window. Please backport the fix for precise.

Revision history for this message
Conrad (conrad-couture) wrote :

Happened to me too as of today on Xubuntu12.10 64bit. Fresh install. It was reported that the bug was fixed in 12.07.30-0ubuntu2, how does one get that?

Revision history for this message
Andris Berzins (pkix) wrote :

The same issue here after upgrading to 12.10.
Please backport this fix. Without it indicator-weather is useless.

Revision history for this message
Eero (eero+launchpad) wrote :

This application is still broken in 12.04. I got this error today when I installed and tried to add a location.

Revision history for this message
Stewart Gebbie (sgebbie) wrote :

I can confirm that this is an issue under 12.10 for me too:

Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1892, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

Revision history for this message
Stewart Gebbie (sgebbie) wrote :

Thanks, Michael Vogt, your diff fixed the problem for me running 12.10.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello robin0800, or anyone else affected,

Accepted indicator-weather into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/indicator-weather/12.07.30-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in indicator-weather (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Nicholas Christian Langkjær Ipsen (ncli) wrote :

Is this going to be backported to 12.04? If not, I think it's bvetter that the application is withdrawn from the 12.04 archive as it's currently completely useless, casting a bad light on the overall quality of Ubuntu.

Revision history for this message
Simen (simen-burud) wrote :

The bug is still present in version 12.07.30-0ubuntu1 on 12.10 x64:

xxxxxxxxPCubuntu:~$ indicator-weather
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject

(indicator-weather:7987): Gtk-WARNING **: Kunne ikke finne temamotor i module_path: «oxygen-gtk».
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1892, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

Revision history for this message
Alexandr Jeliuc (jeliucalexandr) wrote :

#4 helped me to fix this bug.

Ubuntu 12.10

Revision history for this message
tankdriver (stoneraider-deactivatedaccount) wrote :

dpkg -l | grep indicator-weather
ii indicator-weather 12.07.30-0ubuntu1.1

This bug is fixed for me.
I can add locations without any problems.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Hansen (moteprime) wrote :

@Simen (simen-burud), You need 12.07.30-0ubuntu1.1 from the proposed repositories.

Revision history for this message
SoFl W (sofl-w) wrote :

Uco (ucomesdag) #4 suggestion seems to have fixed the problem for me. I can now add locations, change preferences, and get updates in both Google and Yahoo.

Revision history for this message
SoFl W (sofl-w) wrote :

See above, although the problem seems to be fixed I can not get Forecast updates, it says there is no connection available.

Revision history for this message
Christopher Nighswonger (cnighswonger) wrote :

After implementing #4, I experienced the same issue as #26.

Iain Lane (laney)
Changed in indicator-weather (Ubuntu Precise):
status: New → In Progress
assignee: nobody → Iain Lane (laney)
Revision history for this message
Iain Lane (laney) wrote :

Uploaded to Precise too; this is a top crasher on errors.u.c.

Revision history for this message
Adam Conrad (adconrad) wrote :

Hello robin0800, or anyone else affected,

Accepted indicator-weather into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/indicator-weather/11.11.28-0ubuntu1.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in indicator-weather (Ubuntu Precise):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Confirming now working with the precise-proposed version, thanks!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-weather - 11.11.28-0ubuntu1.3

---------------
indicator-weather (11.11.28-0ubuntu1.3) precise; urgency=low

  * fix crash when adding new location (LP: #821233)
    Thanks to Mantas Kriaučiūnas (mantas)
 -- Iain Lane <email address hidden> Thu, 17 Jan 2013 12:41:17 +0000

Changed in indicator-weather (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-weather - 12.07.30-0ubuntu1.1

---------------
indicator-weather (12.07.30-0ubuntu1.1) quantal-proposed; urgency=low

  * fix crash when adding new location (LP: #821233)
    Thanks to Mantas Kriaučiūnas (mantas)
 -- Michael Vogt <email address hidden> Tue, 18 Dec 2012 09:59:40 +0100

Changed in indicator-weather (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Akop (grifon31) wrote :

Hi I have recieved the same error. Ubuntu 12.04. Location: Kyiv,Ukraine. Label : Kyiv,Kiev

Revision history for this message
dino99 (9d9) wrote :

Also need to be fixed into Raring i386: got that issue while validating the location.

tags: added: gnome3
tags: added: gnome-shell
Revision history for this message
dino99 (9d9) wrote :

As Apport have selected that report, i've tried to add "raring" as "also affected" but only be able to set raring-backports (raring is not accepted !!!), i join the crash file to send more details as i'm using raring i386 + gnome3-team ppa.

Revision history for this message
Robert Cress (robertwcress) wrote :

Same error in Raring i386. Tried to add Chicago, IL and it crashed while adding it.

Revision history for this message
Jose Ocheda Garcia (ocheda-j) wrote :

Se produce un error al añadir Ubicaciones

Changed in indicator-weather (Ubuntu):
assignee: nobody → Jose Ocheda Garcia (ocheda-j)
Revision history for this message
Roland S. (kaiser-ger) wrote :

In Raring Beta 2 I get this error:

Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1896, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 409, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

Roland S. (kaiser-ger)
Changed in indicator-weather (Ubuntu):
assignee: Jose Ocheda Garcia (ocheda-j) → nobody
Revision history for this message
Saúl Martiñán Otero (smosa-16) wrote :

I have the same error in Raring Daily build

Terminal output:

saul@saul-E520:~$ indicator-weather
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1896, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 409, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

Revision history for this message
Jean-Luc Aufranc (jean-luc-aufranc) wrote :

Very strange. The solution to this bug is exactly the opposite of the solution to https://bugs.launchpad.net/weather-indicator/+bug/1090890

And I get the same error whether I use:
if (yahoo_woeid_result['ResultSet']['Error'] != 0)
or
if (yahoo_woeid_result['ResultSet']['Error'] != "0")

Revision history for this message
Jean-Luc Aufranc (jean-luc-aufranc) wrote :

Looking in to the log, I get this error:
[MainThread] 2013-04-07 09:56:48,223 - ERROR - Location: error reaching url 'http://where.yahooapis.com/geocode?flags=J&location=Chiang+Mai%2C+Chiang+Mai%2C+Thailand&appid=mOawLd4s'

When I try in Firefox, I get 404 error: "Sorry, the page you requested was not found.".
I can see Yahoo API has changed to use http://yboss.yahooapis.com/geo/placefinder instead of the link above.

Revision history for this message
Dallman Ross (spamless) wrote :

Fresh install of 13.04 beta-2, 64-bit. Why is this problem still here after so many years and versions?

Revision history for this message
Harald Höller (harald-hoeller) wrote :

I also wonder, same here. Fresh 13.04 \beta installation and the weather applet crashes without exception.

Revision history for this message
Adrian Wechner (adrian-wechner) wrote :

Regarding to Comment #41:
what happens if you replace the line with the following:

if (str(yahoo_woeid_result['ResultSet']['Error']) != "0")

does it then work always?

Revision history for this message
Adrian Wechner (adrian-wechner) wrote :

crap... better this:
if (int(yahoo_woeid_result['ResultSet']['Error']) != 0)
would that conflict then maybe in another place or would that be a functional workaround?

Revision history for this message
sdfsdf (asdasdaf-deactivatedaccount) wrote :

same problem here, i've tried all the solutions here on the comments with no results.. this problem came since i've resinstalled ubuntu 12.10, before reinstalling this have been working well

Revision history for this message
Adrian Wechner (adrian-wechner) wrote :

i checked the code checked the api calls to yahoo. looks like the yahoo api has changed. and maybe the application id of the weather-indicator must be renewed. somebody knows about who hold the application-id for the weather indicator? after checking this then just some api calls to yahoo must be changed. i think with that it would be fixed. I would do that with pleasure, just need some info.

Revision history for this message
sdfsdf (asdasdaf-deactivatedaccount) wrote :

Yeah, but if the yahoo api have changed why if I use google api instead it crashes too?

Revision history for this message
Stephen Conklin (iscrunchywithketchup) wrote :

This is what I see when I run indicator-weather from terminal (ubuntu 13.04)

steve@ubuntu:~$ indicator-weather
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject

ANy ideas what it means? It might as well be greek to me, unfortunately...

Revision history for this message
Sebastien Bacher (seb128) wrote :

wha locations are the people hitting that error trying to add?

Revision history for this message
dino99 (9d9) wrote :

Retying to set the latest 12.07.30-0ubuntu5 on RR i386 + gnome3-team ppas

but got again the same crash reported into #39 above:
- package installation is well done
- setting weather location config: pick-up a location (rennes,brittany,france) and validate -> ok
- setting a name for that location (rennes): the crash happen if "validation" is clicked.

Revision history for this message
lurker655 (lurker655) wrote :

Apparently, Yahoo! stopped the free geocode servers. In order to setup a location, the applet looks for Yahoo's WOEID for a particular location from its servers at e.g. http://where.yahooapis.com/geocode?flags=J&location=London%2C+Englang%2C+United+Kingdom&appid=mOawLd4s but this is no longer available - you have to use the BOSS server http://developer.yahoo.com/boss/geo/ which limits to 2000 queries per app per day.

It seems the weather server is still up for the moment, so if you get the WOEID you can still look up Yahoo!'s weather stations - maybe there are other ways of looking up WOEIDs or the app could just be changed to use the new BOSS API (it needs to be re-registered though - the appid=mOawLd4s doesn't work with BOSS).

Also see: http://stackoverflow.com/questions/15784177/how-to-get-yahoos-woeid-by-location

Revision history for this message
Sabin Iacob (iacobs) wrote :

this patch should fix it (for now); I also took the liberty to use simplejson for parsing the JSON, using eval(string_fetched_from_the_internet) is a... startling decision.

also, it seems Google is returning 403, so that route is not working at all:

[Fetcher] 2013-04-23 12:49:20,957 - ERROR - Indicator: networking error: HTTP Error 403: Forbidden

Revision history for this message
Miroslav Hadzhiev (xtigyro) wrote :

The error occurs in Raring Daily of today.
The Google source is not working at all, too.

Revision history for this message
pablomme (pablomme) wrote :

The patch provided by iacobs fixes the issue for me.

Google discontinued their weather service back in August 2012, so I'm not surprised it doesn't work - the option should be entirely removed from indicator-weather.

Revision history for this message
Felix Furtak (felixfurtak) wrote :

Sorry if this is a bit of an beginner question, but is there any chance of describing how to apply iabobs' patch?

What would the command line be?

I'm assuming it's something along the lines of :

patch <options> <path-to>/indicator-weather woeid-patch.diff

but I'm struggling with this, with HUNK failure. Thanks

Revision history for this message
Felix Geyer (debfx) wrote :

This package has been removed from raring (and saucy):
https://launchpad.net/ubuntu/raring/+source/indicator-weather/12.07.30-0ubuntu5

There is nothing we can backport.

Changed in raring-backports:
status: New → Invalid
Revision history for this message
Peter Veerman (pveerman) wrote :

@felixfurtak: you can fix the woeid-patch.diff yourself as following:

@line 38
- if (yahoo_woeid_result['ResultSet']['Error'] != 0) and (yahoo_woeid_result['ResultSet']['Results'] != None):
Must become:
- if (yahoo_woeid_result['ResultSet']['Error'] != '0') and (yahoo_woeid_result['ResultSet']['Results'] != None):

Revision history for this message
TaNgO (tango-lugmen) wrote :

Patch proposed in #54 by (iacobs) with fix from #59 by (pveerman) made it work for me. Ubuntu 12.04 upgraded yesterday from 10.04.

Revision history for this message
Andreas Jährig (washuu-de) wrote :

It's the same with Yahoo forecast. Doesn't work.

The crash persists. I didn't see any official update. I thought 'Fix released' means that '/usr/bin/update-manager' will find it.
Anyway. Adding a location as is stated in the bug description still crashes "indicator-weather". I could reproduce that just now.

Revision history for this message
Andreas Jährig (washuu-de) wrote :

I've installed Precise Pangolin 12.04.
I forgot to mention that in my msg.

Revision history for this message
peter smout (psmouty) wrote : Re: [Bug 821233] Re: indicator-weather crashed with AttributeError in export_location_details(): Location instance has no attribute 'location_code'

On 10/05/13 20:47, Andreas Jährig wrote:
> It's the same with Yahoo forecast. Doesn't work.
>
> The crash persists. I didn't see any official update. I thought 'Fix released' means that '/usr/bin/update-manager' will find it.
> Anyway. Adding a location as is stated in the bug description still crashes "indicator-weather". I could reproduce that just now.
>
+1
So can I

Joshua Tasker (jtasker)
Changed in weather-indicator:
status: New → Fix Released
milestone: none → 13.05.17
dino99 (9d9)
tags: removed: oneiric
Revision history for this message
Joshua Tasker (jtasker) wrote :

This has been fixed in 13.05.17; you can get the tarball from here: https://bugs.launchpad.net/weather-indicator/+milestone/13.05.17
or you can get a package from the Weather Indicator Team PPA here: https://launchpad.net/~weather-indicator-team/+archive/ppa

Revision history for this message
jamie (jgwild) wrote :

This is a clean install of Ubuntu 12.04.3 amd64 and this bug is not fixed.
As suggested, I looked at the code at line 367 and it looks like this:
Pasted directly from gedit /usr/bin/indicator-weather
if (yahoo_woeid_result['ResultSet']['Error'] != '0') and (yahoo_woeid_result['ResultSet']['Results'] != None):

Ubuntu reported an internal error but the crash reporting failed (twice)
Rebooted ran the "Setup weather Location" again but it just hangs at the "Apply" button in the wizard and does not trigger the crash report.

Revision history for this message
otticek (otticek) wrote :

thank you.

2013/10/14 jamie <email address hidden>

> This is a clean install of Ubuntu 12.04.3 amd64 and this bug is not fixed.
> As suggested, I looked at the code at line 367 and it looks like this:
> Pasted directly from gedit /usr/bin/indicator-weather
> if (yahoo_woeid_result['ResultSet']['Error'] != '0') and
> (yahoo_woeid_result['ResultSet']['Results'] != None):
>
> Ubuntu reported an internal error but the crash reporting failed (twice)
> Rebooted ran the "Setup weather Location" again but it just hangs at the
> "Apply" button in the wizard and does not trigger the crash report.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1131267).
> https://bugs.launchpad.net/bugs/821233
>
> Title:
> indicator-weather crashed with AttributeError in
> export_location_details(): Location instance has no attribute
> 'location_code'
>
> Status in Raring Backports:
> Invalid
> Status in Indicator-Weather:
> Fix Released
> Status in “indicator-weather” package in Ubuntu:
> Fix Released
> Status in “indicator-weather” source package in Precise:
> Fix Released
> Status in “indicator-weather” source package in Quantal:
> Fix Released
> Status in “indicator-weather” package in Baltix:
> In Progress
>
> Bug description:
> TEST CASE:
> 1. install indicator-weather, and run it from the commandline (or if you
> have it already, the guest session works too)
> 2. click on "Setup weather"
> 3. add a location and click on the wizard until "apply"
> 4. verify the crash
>
> 5. install the new version
> 6. repeat step 2,3 and verify that it does not crash anymore
>
> On Oneiric Alpha3 on trying to set up this application at the apply
> stage
>
> ProblemType: Crash
> DistroRelease: Ubuntu 11.10
> Package: indicator-weather 11.05.31-0ubuntu2
> ProcVersionSignature: Ubuntu 3.0.0-7.9-generic 3.0.0
> Uname: Linux 3.0.0-7-generic i686
> Architecture: i386
> Date: Fri Aug 5 03:16:15 2011
> ExecutablePath: /usr/bin/indicator-weather
> InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386
> (20110802.1)
> InterpreterPath: /usr/bin/python2.7
> PackageArchitecture: all
> ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
> ProcEnviron:
> LANGUAGE=en_GB:en
> LANG=en_GB.UTF-8
> SHELL=/bin/bash
> PythonArgs: ['/usr/bin/indicator-weather']
> SourcePackage: indicator-weather
> Title: indicator-weather crashed with AttributeError in
> export_location_details(): Location instance has no attribute
> 'location_code'
> UpgradeStatus: No upgrade log present (probably fresh install)
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/raring-backports/+bug/821233/+subscriptions
>

Revision history for this message
vmajor (victor-major) wrote :

Still broken on 12.04 LTS, 2 years on. This app should be removed from the repository. It simply does not work in 12.04.3

Revision history for this message
Joe Philipps (2-launchpad-joe-philipps-us) wrote :

I concur, it's still broken on my system which says it's 12.04.4. I even downloaded the individual packages' .deb files (pywapi and indicator-weather) from the PPA for Precise and used gdebi-gtk to install them. It might accept new locations after searching for them, but now up to the point of clicking on "OK" for the window "Weather Indicator Preferences" I see this in an Xterm

/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `PreferencesDialog' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `Assistant' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 2560, in ok
    wi.menu_locations()
  File "/usr/bin/indicator-weather", line 1872, in menu_locations
    self.city_show.set_submenu(locations_menu)
AttributeError: 'indicator_weather' object has no attribute 'city_show'

It's like, squash one bug, at least one other appears. I have "Show temperature near indicator" ticked yet there is no temperature displayed, so I have to conclude it's not working.

Revision history for this message
Id2ndR (id2ndr) wrote :

When I tried to add a city with indicator-weather 12.07.30-0ubuntu1.1 (Ubuntu 13.10), the apply button didn't do anything (the window didn't close).
In the terminal, I got:
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1892, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

It has been fixed by adding ppa:weather-indicator-team/ppa (indicator-weather 13.8.0)

dino99 (9d9)
Changed in indicator-weather (Baltix):
status: In Progress → Fix Released
Revision history for this message
Tom Dolinski (tomdolinski) wrote :

Not fixed Precise:
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1883, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

Revision history for this message
Eugene Crosser (crosser) wrote :

Still happend on Trusty.

Revision history for this message
luckyrings (d8f2) wrote :

Ubuntu 12.04.5 LTS Still not fixed :-(

11.11.28 'Cloudy 9'
Error Message from console:

Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1883, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

Revision history for this message
Ken Sharp (kennybobs) wrote :

This bug *appears* to still be occurring despite the fix. Bug already open:
https://bugs.launchpad.net/ubuntu/+source/indicator-weather/+bug/913610

Revision history for this message
vkapas (vkapas) wrote :

This bug is "Fix Released" but error still happened in 12.04.5 with last updates for Saint-Petersburg city, Russia.

Same with Google and Yahoo weather service:

$ indicator-weather
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1883, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1883, in on_apply
    (location_code, location_details) = self.location.export_location_details()
  File "/usr/bin/indicator-weather", line 405, in export_location_details
    return (self.location_code, self.location_details)
AttributeError: Location instance has no attribute 'location_code'

indicator-weather ver 11.11.28-0ubuntu1.3.

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.