Battery Applet crashes without Battery

Bug #799075 reported by Bruce
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Awn Extras
New
Undecided
Unassigned

Bug Description

If no Battery is attached to my Thinkpad T420 the Battery applet crashes. The following message pops up: "An integer is required".
I'm using Ubuntu 11.04 with "Ubuntu Classic", Awn and the Extras from the Ubuntu repository.
awn-applet-battery-applet 0.4.1~bzr1507-0ubuntu1

You can reproduce the bug by removing battery while running Ubuntu or booting without battery. Since only the applet and not Awn crashes, this bug is not critical. It's annoying and I think it should be easy to solve this issue. The battery state is checked somewhere. I would recommend to implement an "try catch"-block while checking battery state. If the check fails, notify the user "No battery attached" etc.

---------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/awn/extras/awnlib.py", line 1580, in init_start
    applet_class(applet)
  File "/usr/share/avant-window-navigator/applets/battery/battery.py", line 79, in __init__
    self.setup_context_menu()
  File "/usr/share/avant-window-navigator/applets/battery/battery.py", line 169, in setup_context_menu
    self.applet.settings.load_bindings(binder)
  File "/usr/lib/pymodules/python2.7/awn/extras/awnlib.py", line 839, in load_bindings
    return self.__client.load_bindings(object)
  File "/usr/lib/pymodules/python2.7/awn/extras/awnlib.py", line 926, in load_bindings
    self.__config_object = binder.create_gobject()
  File "/usr/lib/pymodules/python2.7/awn/extras/configbinder.py", line 84, in create_gobject
    return ConfigGObject()
  File "/usr/lib/pymodules/python2.7/awn/extras/configbinder.py", line 76, in __init__
    bind_property(client, group, key, self, name, widget, *data[1], **data[2])
  File "/usr/lib/pymodules/python2.7/awn/extras/configbinder.py", line 256, in bind_property
    set_widget_value(widget, value)
  File "/usr/lib/pymodules/python2.7/awn/extras/configbinder.py", line 146, in set_widget_value
    widget.set_active(value)
TypeError: an integer is required

onox (onox)
tags: added: battery traceback
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.