alacarte object has no attribute 'startswith'

Bug #800215 reported by zniavre
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Alacarte Menu Editor
New
High
alacarte (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: alacarte

using ubuntu 11.10 without unity and gnome-shell
minimal installation of gnome-3.0
the Application menu is empty, new user does not solve the empty Application menu.
launching 'alacarte' gives a traceback (must be sent with bug-report).

thank you best regards

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: alacarte 0.13.2-2ubuntu2
ProcVersionSignature: Ubuntu 3.0-1.2-generic 3.0.0-rc3
Uname: Linux 3.0-1-generic i686
Architecture: i386
Date: Tue Jun 21 16:27:44 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=fr_FR:en
 PATH=(custom, no user)
 LANG=fr_FR.utf8
 LC_MESSAGES=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: alacarte
UpgradeStatus: Upgraded to oneiric on 2011-06-07 (14 days ago)

Revision history for this message
zniavre (zniavre2048-gmail) wrote :
Revision history for this message
zniavre (zniavre2048-gmail) wrote :

zniavre2@zniavre2:~$ alacarte
Traceback (most recent call last):
  File "/usr/bin/alacarte", line 37, in <module>
    main()
  File "/usr/bin/alacarte", line 33, in main
    app = MainWindow(datadir, version, sys.argv)
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 49, in __init__
    self.editor = MenuEditor()
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 36, in __init__
    self.__loadMenus()
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 44, in __loadMenus
    self.applications.path = os.path.join(util.getUserMenuPath(), self.applications.tree.get_menu_file())
  File "/usr/lib/python2.7/posixpath.py", line 66, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
zniavre2@zniavre2:~$ ubuntu-bug alacarte

Jason Conti (jconti)
Changed in alacarte (Ubuntu):
status: New → Confirmed
Revision history for this message
Jason Conti (jconti) wrote :

Marking this as confirmed. The gnome-menus package includes a patch that renames /etc/xdg/menus/applications.menu to gnome-applications.menu. Including a minimal patch that allows alacarte to run. However it is possible for tree.get_menu_file() to return None if both ~/.config/menus/gnome-applications.menu and /etc/xdg/menus/gnome-applications.menu are missing, and alacarte should probably check for this and handle it gracefully.

This will not fix the problem of the Applications menu being empty. Copying ~/.config/menus/gnome-applications.menu back to applications.menu will populate the menu, so it seems gnome-panel doesn't handle this change yet either. There is a bug for this: https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/798951

tags: added: patch
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the report, linking the upstream report https://bugzilla.gnome.org/show_bug.cgi?id=647382.

Changed in alacarte (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in alacarte:
importance: Unknown → High
status: Unknown → New
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.