Crash when reading 'places' setting if saved setting is invalid or unreadable (indicator-weather crashed with AttributeError in menu_locations(): 'indicator_weather' object has no attribute 'city_show')

Bug #1234514 reported by CzeraRyu
292
This bug affects 54 people
Affects Status Importance Assigned to Milestone
Weather Indicator
Fix Released
High
Joshua Tasker

Bug Description

indicator-weather crashes when I'm configuring it, just after when I'm searching the city and it does nothing when the "Accept" button is clicked.

ProblemType: Crash
DistroRelease: Ubuntu 13.04
Package: indicator-weather 13.7.1 [origin: LP-PPA-weather-indicator-team]
ProcVersionSignature: Ubuntu 3.8.0-31.46-generic 3.8.13.8
Uname: Linux 3.8.0-31-generic i686
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: i386
CrashCounter: 1
CrashDB: indicator_weather
Date: Wed Oct 2 22:52:08 2013
ExecutablePath: /usr/bin/indicator-weather
InstallationDate: Installed on 2013-10-03 (0 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release i386 (20130424)
InterpreterPath: /usr/bin/python2.7
MarkForUpload: True
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
ProcEnviron:
 LANGUAGE=es_MX:es
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=es_MX.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/indicator-weather']
SourcePackage: indicator-weather
ThirdParty: True
Title: indicator-weather crashed with AttributeError in menu_locations(): 'indicator_weather' object has no attribute 'city_show'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
CzeraRyu (roy-ruiz-cera) wrote :
Revision history for this message
Joshua Tasker (jtasker) wrote :

Your saved places somehow got corrupted. In the next unstable release, Weather Indicator will detect this and reset them, but for now you can do one of two things:

Either run this command in a terminal, which will reset your saved places:

   gsettings rest apps.indicators.weather places

Or apply the patch I have attached here to Weather Indicator, and restart it, and it should not crash again.

Changed in weather-indicator:
status: New → Triaged
summary: - indicator-weather crashed with AttributeError in menu_locations():
- 'indicator_weather' object has no attribute 'city_show'
+ Crash when reading 'places' setting if saved setting is invalid or
+ unreadable (indicator-weather crashed with AttributeError in
+ menu_locations(): 'indicator_weather' object has no attribute
+ 'city_show')
Changed in weather-indicator:
importance: Undecided → High
assignee: nobody → Joshua Tasker (jtasker)
milestone: none → 13.7.2
Joshua Tasker (jtasker)
information type: Private → Public
Revision history for this message
Joshua Tasker (jtasker) wrote :

Previous patch wasn't correct, sorry.

Joshua Tasker (jtasker)
Changed in weather-indicator:
status: Triaged → Fix Committed
Revision history for this message
Jos Geluk (t-jos) wrote :

I got the same crash and applied the patch. Now I get:

Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 2551, in ok
    old_place = wi.places[wi.placechosen]
IndexError: list index out of range

This is after adding one location and pressing OK.

Revision history for this message
Biblioclasta (biblioclasta) wrote :

same here:

Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 2551, in ok
    old_place = wi.places[wi.placechosen]
IndexError: list index out of range

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

same error on saucy.

Revision history for this message
Damian Jimenez (jimenez-damian) wrote :

Had the same error and it turned out that the culprit line was

apps.indicators.weather places '["[", "]", ["115958", "Chihuahua"]]'

I did ran "gsettings rest apps.indicators.weather places" in the terminal and tried setting the location again via the GUI but it seemed to leave an empty value as the first value in the list, as seen above. So I closed the app and ran "gsettings rest apps.indicators.weather" places again and then ran "gsettings set apps.indicators.weather places '[["WOEID", "NAMEOFYOURCHOICE"]]'"

You can get the WOEID for your location at weather.yahoo website. If I search for New York the ending part of the url looks something like "new-york-2459115/" and that number is your WOEID.

e.g. if you lived in New York, New York you would run something like "gsettings set apps.indicators.weather places '[["2459115", "New York"]]'"

Revision history for this message
Damian Jimenez (jimenez-damian) wrote :

Sorry I left the original typo from the previous poster it's supposed to be "gsettings reset apps.indicators.weather places"

Hope this helps some people.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Thanks. That worked! I run (for my place) " gsettings reset apps.indicators.weather places '[["2295020", "Gurgaon"]]' ".

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Sorry. Its "gsettings set apps.indicators.weather places '[["2295020", "Gurgaon"]]' ".

Revision history for this message
Juan Martin (jhashimo) wrote :

Gracias, ahora está funcionando en Ubuntu 12.04 para Buenos Aires.
Ejecutar en una terminal gsettings set apps.indicators.weather places '[["468739", "Baires"]]'

Joshua Tasker (jtasker)
Changed in weather-indicator:
status: Fix Committed → Fix Released
milestone: 13.7.2 → 13.8.0
Revision history for this message
Γιαννακλής Αθανάσιος (thangian59) wrote : Σχετ: [Bug 1234514] Re: Crash when reading 'places' setting if saved setting is invalid or unreadable (indicator-weather crashed with AttributeError in menu_locations(): 'indicator_weather' object has no attribute 'city_show')

Put even update from here: «ppa: weather-indicator-team/ppa» adding its repositories and working too slow (3 + minutes to change).

Στις 6:05 μ.μ. Πέμπτη, 6 Φεβρουαρίου 2014, ο/η Joshua Tasker <email address hidden> έγραψε:

** Changed in: weather-indicator
       Status: Fix Committed => Fix Released

** Changed in: weather-indicator
    Milestone: 13.7.2 => 13.8.0

--
You received this bug notification because you are subscribed to a
duplicate bug report (1274271).
https://bugs.launchpad.net/bugs/1234514

Title:
  Crash when reading 'places' setting if saved setting is invalid or
  unreadable (indicator-weather crashed with AttributeError in
  menu_locations(): 'indicator_weather' object has no attribute
  'city_show')

Status in Indicator-Weather:
  Fix Released

Bug description:
  indicator-weather crashes when I'm configuring it, just after when I'm
  searching the city and it does nothing when the "Accept" button is
  clicked.

  ProblemType: Crash
  DistroRelease: Ubuntu 13.04
  Package: indicator-weather 13.7.1 [origin: LP-PPA-weather-indicator-team]
  ProcVersionSignature: Ubuntu 3.8.0-31.46-generic 3.8.13.8
  Uname: Linux 3.8.0-31-generic i686
  ApportVersion: 2.9.2-0ubuntu8.3
  Architecture: i386
  CrashCounter: 1
  CrashDB: indicator_weather
  Date: Wed Oct  2 22:52:08 2013
  ExecutablePath: /usr/bin/indicator-weather
  InstallationDate: Installed on 2013-10-03 (0 days ago)
  InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release i386 (20130424)
  InterpreterPath: /usr/bin/python2.7
  MarkForUpload: True
  PackageArchitecture: all
  ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
  ProcEnviron:
   LANGUAGE=es_MX:es
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=es_MX.UTF-8
   SHELL=/bin/bash
  PythonArgs: ['/usr/bin/indicator-weather']
  SourcePackage: indicator-weather
  ThirdParty: True
  Title: indicator-weather crashed with AttributeError in menu_locations(): 'indicator_weather' object has no attribute 'city_show'
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/weather-indicator/+bug/1234514/+subscriptions

Revision history for this message
Γιαννακλής Αθανάσιος (thangian59) wrote :
Download full text (4.2 KiB)

Put even update from here: «ppa: weather-indicator-team/ppa» adding its
repositories and working too slow (3 + minutes to change).

Στις 12:15 π.μ. Σάββατο, 8 Φεβρουαρίου 2014, ο/η Γιαννακλής Αθανάσιος <email address hidden> έγραψε:

Put even update from here: «ppa: weather-indicator-team/ppa» adding its
repositories and working too slow (3 + minutes to change).

Στις 6:05 μ.μ. Πέμπτη, 6 Φεβρουαρίου 2014, ο/η Joshua Tasker <email address hidden> έγραψε:

** Changed in: weather-indicator
       Status: Fix Committed => Fix Released

** Changed in: weather-indicator
    Milestone: 13.7.2 => 13.8.0

--
You received this bug notification because you are subscribed to a
duplicate bug report (1274271).
https://bugs.launchpad.net/bugs/1234514

Title:
  Crash when reading 'places' setting if saved setting is invalid or
  unreadable (indicator-weather crashed with AttributeError in
  menu_locations(): 'indicator_weather' object has no attribute
  'city_show')

Status in Indicator-Weather:
  Fix Released

Bug description:
  indicator-weather crashes when I'm configuring it, just after when I'm
  searching the city and it does nothing when the "Accept" button is
  clicked.

  ProblemType: Crash
  DistroRelease: Ubuntu 13.04
  Package: indicator-weather 13.7.1 [origin: LP-PPA-weather-indicator-team]
  ProcVersionSignature: Ubuntu 3.8.0-31.46-generic 3.8.13.8
  Uname: Linux 3.8.0-31-generic i686
  ApportVersion: 2.9.2-0ubuntu8.3
  Architecture: i386
  CrashCounter: 1
  CrashDB: indicator_weather
  Date: Wed Oct  2 22:52:08 2013
  ExecutablePath: /usr/bin/indicator-weather
  InstallationDate: Installed on 2013-10-03 (0 days ago)
  InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release i386 (20130424)
  InterpreterPath: /usr/bin/python2.7
  MarkForUpload: True
  PackageArchitecture: all
  ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
  ProcEnviron:
   LANGUAGE=es_MX:es
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=es_MX.UTF-8
   SHELL=/bin/bash
  PythonArgs: ['/usr/bin/indicator-weather']
  SourcePackage: indicator-weather
  ThirdParty: True
  Title: indicator-weather crashed with AttributeError in menu_locations(): 'indicator_weather' object has no attribute 'city_show'
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/weather-indicator/+bug/1234514/+subscriptions

--
You received this bug notification because you are subscribed to a
duplicate bug report (1274271).
https://bugs.launchpad.net/bugs/1234514

Title:
  Crash when reading 'places' setting if saved setting is invalid or
  unreadable (indicator-weather crashed with AttributeError in
  menu_locations(): 'indicator_weather' object has no attribute
  'city_show')

Status in Indicator-Weather:
  Fix Released

Bug description:
  indicator-weather crashes when I'm configuring it, just after when I'm
  searching the city and it does nothing when the "Accept" button is
  clicked.

  ProblemType: Crash
  DistroRelease: Ubuntu 13.04
  Package: indicator-weather 13.7.1 [origin: LP-PPA-weather-indicator-team]
  Proc...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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