AttributeError in YAMA: 'gio.EmblemedIcon' object has no attribute 'get_file'

Bug #503872 reported by Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Awn Extras
Fix Released
Medium
onox

Bug Description

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/awn/extras/awnlib.py", line 1632, in init_start
    applet_class(applet)
  File "/usr/share/avant-window-navigator/applets/yama/yama.py", line 97, in __init__
    self.build_menu()
  File "/usr/share/avant-window-navigator/applets/yama/yama.py", line 126, in build_menu
    self.create_places_submenu(self.menu)
  File "/usr/share/avant-window-navigator/applets/yama/yama.py", line 304, in create_places_submenu
    self.append_volumes()
  File "/usr/share/avant-window-navigator/applets/yama/yama.py", line 440, in append_volumes
    icon_name = self.get_icon_name(volume.get_icon())
  File "/usr/share/avant-window-navigator/applets/yama/yama.py", line 420, in get_icon_name
    return icon.get_file().get_path()
AttributeError: 'gio.EmblemedIcon' object has no attribute 'get_file'

applet version: '0.3.9'

Related branches

onox (onox)
Changed in awn-extras:
assignee: nobody → onox (onox)
importance: Undecided → Medium
milestone: none → 0.4.0
tags: added: applet traceback yama
Revision history for this message
onox (onox) wrote :

If you use gnome: could you attach a screenshot of the places submenu of gnome-panel's menu applet?

Revision history for this message
Scott (scott-414north) wrote :

I use a stripped down install of xfce4. Sorry about the size, but I have dual monitors.

Revision history for this message
onox (onox) wrote :

Can you edit /usr/share/avant-window-navigator/applets/yama/yama.py, go to line line 417 and insert between the line with "def get_icon_name" and the line with "if isinstance(icon, gio.ThemedIcon):", the following lines:

if isinstance(icon, gio.EmblemedIcon):
    icon = icon.get_icon()

So after the insertion the code should look like this:

416 def get_icon_name(self, icon):
417 if isinstance(icon, gio.EmblemedIcon):
418 icon = icon.get_icon()
419 if isinstance(icon, gio.ThemedIcon):

Please tell me whether that fixes the problem.

Changed in awn-extras:
status: New → Confirmed
Revision history for this message
onox (onox) wrote :

*sigh*, launchpad removes the spaces. Indent with 4 extra spaces on line 417 and 419 (in example in previous comment) with respect to line 416. And 8 spaces on line 418.

Revision history for this message
Scott (scott-414north) wrote :

That fixes it. Thanks for the quick response.

Revision history for this message
onox (onox) wrote :

Fixed in revision 1932.

Changed in awn-extras:
status: Confirmed → Fix Committed
Mark Lee (malept)
Changed in awn-extras:
status: Fix Committed → 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.