TypeError in GnoMenu: expected a character buffer object

Bug #822916 reported by Artyom Zorin on 2011-08-08
82
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Awn Extras
Undecided
Unassigned
Arch Linux
New
Undecided
Unassigned

Bug Description

I got this error while using the GnoMenu AWN applet (from here: http://launchpad.net/gnomenu) version 2.9 in AWN 0.4.1 from the Ubuntu Oneric repositories in Ubuntu 11.10 Alpha 3. I have used GnoMenu in AWN with Ubuntu 11.04 perfectly but a TypeError ends up when I added it to the dock. with 11.10. I have the Intel® Ironlake Mobile x86/MMX/SSE2 graphics driver.
Here is the traceback provided by the error dialog:

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/GnoMenu/GnoMenu.py", line 55, in __init__
    self.hwg = Main_Menu(self.HideMenu)
  File "/usr/lib/gnomenu/Menu_Main.py", line 88, in __init__
    self.setup()
  File "/usr/lib/gnomenu/Menu_Main.py", line 340, in setup
    self.PGL = IconProgramList()
  File "/usr/lib/gnomenu/Menu_Widgets.py", line 1845, in __init__
    self.XDG = XDGMenu()
  File "/usr/lib/gnomenu/Menu_Items.py", line 113, in __init__
    self.Restart(item)
  File "/usr/lib/gnomenu/Menu_Items.py", line 147, in Restart
    self.ConstructMenu()
  File "/usr/lib/gnomenu/Menu_Items.py", line 425, in ConstructMenu
    self.SearchMenu(path)
  File "/usr/lib/gnomenu/Menu_Items.py", line 471, in SearchMenu
    if name.upper().count(self.Menu) != 0 or execute.upper().count(self.Menu) != 0:
TypeError: expected a character buffer object

z (scykko) wrote :

I have exactly same error on same version of AWN. Currently using latest arch linux with compiz as standalone wm.

lkspencer (kirk-lkspencer) wrote :

I wanted to use gnomenu with awn and had the same problem. I can't say that I know python as a programming language, but I am a developer and I was able to get it working. There might be a better way to solve the problem but this worked for me.

The attachment has two files that I modified:
    Menu_Items.py
    MenuParser.py

rename those two files found in your [/usr/lib/gnomenu] folder to something like Menu_Items.py.old and MenuParser.py.old and then copy the two files I've attached into that folder.

The error message is identical to the one I was getting and has to do with the way the menu is being parsed. For some reason the first pass fails because there are no items in the menu or something like that. I put a check in place to avoid that error. I then ran into a couple issues with the search, but that should work too.

Good luck!

Artyom Zorin (azorin) wrote :

Thanks a trillion lkspencer!
Your bug fix seems to work perfectly! I will notify the GnoMenu developer so that he can integrate this into an official build of GnoMenu.

Once again thank you very much for the bug fix!

Syele (crazycarla) wrote :

Thanks SO much! I had the same problem and now its working great.

Tommy Bengtsson (tommybe1) wrote :

Thanks very much for the bugfix. I had same problem, but now its work perfect.

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

Other bug subscribers