Crash on adding a location when no other locations are present (indicator-weather crashed with TypeError in ok(): 'NoneType' object has no attribute '__getitem__')

Bug #1224138 reported by Ryan Reamsbottom
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Weather Indicator
High
Joshua Tasker

Bug Description

Every time I install indicator-weather and then add my city, it works fine until I try to click "OK" - basically nothing happens and the system reports a crash. Once I cancel out and exit indicator-weather, when I reopen it my location has been saved and the indicator works normally.

ProblemType: Crash
DistroRelease: Ubuntu 13.04
Package: indicator-weather 13.06.01 [origin: LP-PPA-weather-indicator-team]
ProcVersionSignature: Ubuntu 3.8.0-30.44-generic 3.8.13.6
Uname: Linux 3.8.0-30-generic x86_64
NonfreeKernelModules: nvidia zfs zunicode zavl zcommon znvpair
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
CrashDB: indicator_weather
Date: Wed Sep 11 15:45:18 2013
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/indicator-weather
InstallationDate: Installed on 2013-09-11 (0 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
InterpreterPath: /usr/bin/python2.7
MarkForUpload: True
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/indicator-weather
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_CA.UTF-8
 SHELL=/bin/zsh
PythonArgs: ['/usr/bin/indicator-weather']
SourcePackage: indicator-weather
ThirdParty: True
Title: indicator-weather crashed with TypeError in ok(): 'NoneType' object has no attribute '__getitem__'
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/indicator-weather", line 2537, in ok
     if wi.places[i] is not None and wi.places[i][0] == wi.place[0]:
 TypeError: 'NoneType' object has no attribute '__getitem__'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Ryan Reamsbottom (ryanrms) wrote :
Joshua Tasker (jtasker)
Changed in weather-indicator:
status: New → Triaged
Revision history for this message
Joshua Tasker (jtasker) wrote :

This only occurs if you have no places set up -- the check for an empty place wasn't working.

It will be fixed in the next unstable build, but for now I have attached a patch to fix the issue.

summary: - Crash on adding location: indicator-weather crashed with TypeError in
- ok(): 'NoneType' object has no attribute '__getitem__'
+ Crashes on adding a location when no other locations are present:
+ indicator-weather crashed with TypeError in ok(): 'NoneType' object has
+ no attribute '__getitem__'
summary: - Crashes on adding a location when no other locations are present:
- indicator-weather crashed with TypeError in ok(): 'NoneType' object has
- no attribute '__getitem__'
+ Crashes on adding a location when no other locations are present
+ (indicator-weather crashed with TypeError in ok(): 'NoneType' object has
+ no attribute '__getitem__')
summary: - Crashes on adding a location when no other locations are present
+ Crash on adding a location when no other locations are present
(indicator-weather crashed with TypeError in ok(): 'NoneType' object has
no attribute '__getitem__')
Changed in weather-indicator:
status: Triaged → Fix Committed
information type: Private → Public
Changed in weather-indicator:
importance: Undecided → Medium
milestone: none → 13.7.0
Joshua Tasker (jtasker)
Changed in weather-indicator:
importance: Medium → High
assignee: nobody → Joshua Tasker (jtasker)
Joshua Tasker (jtasker)
Changed in weather-indicator:
status: Fix Committed → Fix Released
Revision history for this message
Ivan Mudrik (host0) wrote :

I have the latest release from https://launchpad.net/~weather-indicator-team/+archive/ppa and still have the bug.

Weather Indicator crashes after adding a location
Linux home 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

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

Other bug subscribers