GNOME Bugzilla – Bug 677343
0.13.4 crashes on startup: AttributeError: 'TreeIter' object has no attribute 'get_separator'
Last modified: 2012-06-25 14:23:58 UTC
$ alacarte Traceback (most recent call last):
+ Trace 230301
main()
app.run()
self.loadMenus()
self.on_menu_tree_cursor_changed(menu_tree)
self.loadItems(self.menu_store[menu_path][2], menu_path)
for item, show in self.editor.getItems(menu):
item = item_iter.get_separator()
Seems to be missing gnome-menus API.
Ah, maybe not new enough?
$ rpm -qa | grep menu lib64gnome-menu2-3.0.1-3.mga2 lib64gmenu-gir3.0-3.4.2-1.mga3 lib64gmenu-gir2.0-3.0.1-3.mga2 python-gnome-menus-3.4.2-1.mga3 menu-messages-1-0.2.mga1 gnome-menus-3.4.2-1.mga3 gnome-menus-debug-3.4.2-1.mga3 lib64gnome-menu3_0-3.4.2-1.mga3 lib64gnome-menu-devel-3.4.2-1.mga3 I'm guessing it takes the 3.0 version..
No, it's that the API never existed in the first place. Not sure who wrote that code in the first place. https://bugzilla.gnome.org/show_bug.cgi?id=677344
Ah ok, I prefer if this goes in gnome-menu 3.4.x, so I can provide Alacarte for Mageia 2.
After applying that patch, Alacarte still crashes at startup with Traceback (most recent call last): File /usr/bin/alacarte, line 37, in <module> main() File /usr/bin/alacarte, line 34, in main app.run() File /usr/share/alacarte/Alacarte/MainWindow.py, line 65, in run self.loadMenus() File /usr/share/alacarte/Alacarte/MainWindow.py, line 204, in loadMenus self.on_menu_tree_cursor_changed(menu_tree) File /usr/share/alacarte/Alacarte/MainWindow.py, line 364, in on_menu_tree_cursor_changed self.loadItems(self.menu_store[menu_path][2], menu_path) File /usr/share/alacarte/Alacarte/MainWindow.py, line 224, in loadItems elif isinstance(item, GMenu.Separator): File /usr/lib/python2.7/dist-packages/gi/module.py, line 249, in __getattr__ return getattr(self._introspection_module, name) File /usr/lib/python2.7/dist-packages/gi/module.py, line 107, in __getattr__ self.__name__, name)) AttributeError: 'gi.repository.GMenu' object has no attribute 'Separator' Making the obvious fix of changing 'Separator' to 'TreeSeparator' at MainWindow.py:223 allows it to start again.
Created attachment 216126 [details] [review] MainWindow: Fix typos related to separators Thanks, Ian.
Attachment 216126 [details] pushed as f3a41e1 - MainWindow: Fix typos related to separators I attached the patch so that you could easily put it in a distro patch.
I'm still having that problem with alacarte from git (3.5.4) on Fedora 17 (GNOME 3.4). alacarte fails to show the window. Instead, following is shown on the terminal: $ alacarte Traceback (most recent call last):
+ Trace 230418
It doesn't seem to me that the attached patch would fix the problem in the original backtrace. It must have fixed some other problem. I think the bug as reported is not really fixed. Commenting out the offending lines with get_separator() allows alacarte to start.
Sorry, I spoke too soon. I didn't realize that gnome-menus also needs to be patched. I rebuilt the gnome-menus rpm with the patch, and now the alacarte window would appear.
You also commented on the Fedora bug about the window still being useless. What do you mean?
I cannot create any new menu or item under LXDE. It turns out I can create menus and items under GNOME. alacarte shows them where I create them. However, the Application menu in GNOME Shell shows the new items under Others and the new menus are not shown at all. Then I logged in under LXDE and found the new items in the Other menu as well. What I really want is to add xterm, firefox and a few other programs to the top level menu and have them above Accessories and other menus. I want everything to work in LXDE without ever having to log in under GNOME. I could do that with alacarte on Fedora versions that came with GNOME 2.x. But it's impossible now.
How can you not create any new menu or item under LXDE? Can you file another bug for it, with explanations of what you see? I reproduced the gnome-shell menu issue and it's a gnome-shell issue. I'll look into it this week.