Cardapio crashes on startup

Bug #995538 reported by Steve Benchik
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cardapio
Fix Released
Undecided
Unassigned

Bug Description

I'm running Xubuntu 12.04 and installed Cardapo from the PPA. When I try to run it in a terminal, I get this:

stevetest@stevetest-VirtualBox:~$ cardapio
Exception AttributeError: "'CardapioPlugin' object has no attribute 'package_monitor'" in <bound method CardapioPlugin.__del__ of <software_center.CardapioPlugin object at 0xa2e828c>> ignored
Traceback (most recent call last):
  File "/usr/bin/cardapio", line 172, in <module>
    cardapio_run_standalone_but_hidden()
  File "/usr/bin/cardapio", line 99, in cardapio_run_standalone_but_hidden
    start_cardapio(show = Constants.DONT_SHOW)
  File "/usr/bin/cardapio", line 45, in start_cardapio
    Cardapio(show = show)
  File "/usr/lib/cardapio/Cardapio.py", line 182, in __init__
    self._build_ui()
  File "/usr/lib/cardapio/Cardapio.py", line 777, in _build_ui
    self._fill_system_list()
  File "/usr/lib/cardapio/Cardapio.py", line 1835, in _fill_system_list
    for entry in self._sys_tree:
  File "/usr/lib/cardapio/GMenuHelper.py", line 56, in __iter__
    return the_iter(self._node.contents)
AttributeError: 'NoneType' object has no attribute 'contents'

My cadapio.log file looks like this:
3859 INFO ----------------- Cardapio launched -----------------
 3860 INFO Cardapio version: 0.9.194
 3893 INFO Distribution: Linux-3.2.0-23-generic-i686-athlon-with-Ubuntu-12.04-precise
 3894 INFO Loading settings...
 3955 INFO Saving config file...
 3956 INFO ...done saving config file!
 3956 INFO ...done loading settings!
 3956 INFO Setting up DBus...
 3957 INFO ...done setting up DBus!
 3985 INFO Setting up UI...
 9707 INFO ...done setting up UI!
 9708 INFO Setting up panel applet (if any)...
 9710 INFO ...done setting up panel applet!
 9711 INFO Setting up Plugins...
 10085 INFO [zeitgeist_simple] Initializing...
 10088 ERROR [Recent documents (simple)] Could not import certain modules
 10088 ERROR [Recent documents (simple)] No module named zeitgeist.client
 10088 INFO [Recent documents (simple)] Plugin did not load properly
 10088 ERROR [zeitgeist_simple] ...failed!
 10089 INFO [command_launcher] Initializing...
 10092 INFO [command_launcher] ...done!
 10092 INFO [software_center] Initializing...
 10813 ERROR [Software Center] Could not import certain modules
 10813 ERROR [Software Center] cannot import name XAPIAN_VALUE_POPCON
 10813 INFO [Software Center] Plugin did not load properly
 10814 ERROR [software_center] ...failed!
 10884 INFO ...done setting up Plugins!
 10884 INFO Building UI...
 11269 WARNING Could not find Control Center menu file. Deactivating Control Center button.
 13739 ERROR [google] No such category in this plugin!
 13739 ERROR list index out of range
 988 INFO ----------------- Cardapio launched -----------------
 988 INFO Cardapio version: 0.9.194
 1024 INFO Distribution: Linux-3.2.0-23-generic-i686-athlon-with-Ubuntu-12.04-precise
 1026 INFO Loading settings...
 1059 INFO Saving config file...
 1059 INFO ...done saving config file!
 1060 INFO ...done loading settings!
 1061 INFO Setting up DBus...
 1064 INFO ...done setting up DBus!
 1084 INFO Setting up UI...
 2182 INFO ...done setting up UI!
 2182 INFO Setting up panel applet (if any)...
 2186 INFO ...done setting up panel applet!
 2186 INFO Setting up Plugins...
 2292 INFO [zeitgeist_simple] Initializing...
 2293 ERROR [Recent documents (simple)] Could not import certain modules
 2293 ERROR [Recent documents (simple)] No module named zeitgeist.client
 2293 INFO [Recent documents (simple)] Plugin did not load properly
 2293 ERROR [zeitgeist_simple] ...failed!
 2293 INFO [command_launcher] Initializing...
 2296 INFO [command_launcher] ...done!
 2296 INFO [software_center] Initializing...
 2361 ERROR [Software Center] Could not import certain modules
 2361 ERROR [Software Center] cannot import name XAPIAN_VALUE_POPCON
 2361 INFO [Software Center] Plugin did not load properly
 2361 ERROR [software_center] ...failed!
 2404 INFO ...done setting up Plugins!
 2405 INFO Building UI...
 2470 WARNING Could not find Control Center menu file. Deactivating Control Center button.
 3167 ERROR [google] No such category in this plugin!
 3169 ERROR list index out of range
 1079 INFO ----------------- Cardapio launched -----------------
 1112 INFO Cardapio version: 0.9.194
 1178 INFO Distribution: Linux-3.2.0-23-generic-i686-athlon-with-Ubuntu-12.04-precise
 1182 INFO Loading settings...
 1402 INFO Saving config file...
 1403 INFO ...done saving config file!
 1403 INFO ...done loading settings!
 1404 INFO Setting up DBus...
 1405 INFO ...done setting up DBus!
 1465 INFO Setting up UI...
 3030 INFO ...done setting up UI!
 3031 INFO Setting up panel applet (if any)...
 3034 INFO ...done setting up panel applet!
 3034 INFO Setting up Plugins...
 3220 INFO [zeitgeist_simple] Initializing...
 3222 ERROR [Recent documents (simple)] Could not import certain modules
 3222 ERROR [Recent documents (simple)] No module named zeitgeist.client
 3222 INFO [Recent documents (simple)] Plugin did not load properly
 3222 ERROR [zeitgeist_simple] ...failed!
 3222 INFO [command_launcher] Initializing...
 3226 INFO [command_launcher] ...done!
 3227 INFO [software_center] Initializing...
 3816 ERROR [Software Center] Could not import certain modules
 3816 ERROR [Software Center] cannot import name XAPIAN_VALUE_POPCON
 3817 INFO [Software Center] Plugin did not load properly
 3817 ERROR [software_center] ...failed!
 3882 INFO ...done setting up Plugins!
 3882 INFO Building UI...
 4150 WARNING Could not find Control Center menu file. Deactivating Control Center button.
 5466 ERROR [google] No such category in this plugin!
 5466 ERROR list index out of range
 1660 INFO ----------------- Cardapio launched -----------------
 1661 INFO Cardapio version: 0.9.194
 1735 INFO Distribution: Linux-3.2.0-23-generic-i686-athlon-with-Ubuntu-12.04-precise
 1736 INFO Loading settings...
 1776 INFO Saving config file...
 1777 INFO ...done saving config file!
 1778 INFO ...done loading settings!
 1785 INFO Setting up DBus...
 1785 INFO ...done setting up DBus!
 1829 INFO Setting up UI...
 3297 INFO ...done setting up UI!
 3297 INFO Setting up panel applet (if any)...
 3301 INFO ...done setting up panel applet!
 3301 INFO Setting up Plugins...
 3485 INFO [zeitgeist_simple] Initializing...
 3487 ERROR [Recent documents (simple)] Could not import certain modules
 3487 ERROR [Recent documents (simple)] No module named zeitgeist.client
 3487 INFO [Recent documents (simple)] Plugin did not load properly
 3487 ERROR [zeitgeist_simple] ...failed!
 3488 INFO [command_launcher] Initializing...
 3491 INFO [command_launcher] ...done!
 3492 INFO [software_center] Initializing...
 3987 ERROR [Software Center] Could not import certain modules
 3987 ERROR [Software Center] cannot import name XAPIAN_VALUE_POPCON
 3987 INFO [Software Center] Plugin did not load properly
 3988 ERROR [software_center] ...failed!
 4036 INFO ...done setting up Plugins!
 4037 INFO Building UI...
 4615 WARNING Could not find Control Center menu file. Deactivating Control Center button.
 6393 ERROR [google] No such category in this plugin!
 6394 ERROR list index out of range

I do have python-tk and python-glade2 installed. Cardapio is a great menu, and I hope I can use it.

Revision history for this message
Thiago Teixeira (tvst) wrote :

At a first glance it looks like this should be fixable with a one-liner, so I will give this a try later today.

Revision history for this message
Thiago Teixeira (tvst) wrote :

Ok, try the version in trunk and let's see if the problem persists.

How to try the trunk version:
https://answers.launchpad.net/cardapio/+faq/1352
(second half of this FAQ)

Or, if you use cardapio-unstable as your PPA, this should get updated tonight.

Revision history for this message
letmedeletemyaaccount (letmedeletemyaaccount) wrote :

I am also using xubuntu 12.04 and got the exact same errors even when using the unstable PPA, i haven't triend building it thought

Revision history for this message
faiwer (faiwer) wrote :

winnie666, +1. I have this problem on xubuntu 12.04 too. Error:
http://pastebin.com/Db9PX1tD

Revision history for this message
Steve Benchik (jellofello112) wrote :

I fixed it by building from the bzr and editing the lines of a few files. I've since reverted to the stock XFCE menu for it's better integration with the XFCE panel. Thanks for the quick response, though.

Revision history for this message
Thiago Teixeira (tvst) wrote :

Can you attach your edited files here? I'd be curious to see what did the trick for you...

Revision history for this message
Steve Benchik (jellofello112) wrote :

I just corrected the errors I got from running it in a terminal.

Revision history for this message
cpburnz (cpburnz) wrote :

I'm getting the exact same error when using either 0.9.194-0recipe864~cardapioteam~precise1 or 0.9.194-0recipe869-unstable~cardapioteam~precise1.

Revision history for this message
Thiago Teixeira (tvst) wrote :

Ok, please try the latest version from trunk. I think this should be fixed now.

Revision history for this message
faiwer (faiwer) wrote :

After updating:

faiwer@faiwer-desktop:~$ cardapio
Traceback (most recent call last):
  File "/usr/bin/cardapio", line 198, in <module>
    cardapio_show(centered = True)
  File "/usr/bin/cardapio", line 113, in cardapio_show
    start_cardapio(show = position)
  File "/usr/bin/cardapio", line 43, in start_cardapio
    from Cardapio import Cardapio
  File "/usr/lib/cardapio/Cardapio.py", line 62, in <module>
    fatal_error('Fatal error loading Cardapio', exception)
  File "/usr/lib/cardapio/misc.py", line 25, in fatal_error
    import Tkinter
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
    raise ImportError, str(msg) + ', please install the python-tk package'

After $ sudo aptitude install python-tk, when I call cardapio by

$ cardapio
or
$ cardapio show-near-mouse

I see empty window with:
title: Fatal Error loading cardapio
message: No module named MenuHelperInterface

screenshot attached

Revision history for this message
Thiago Teixeira (tvst) wrote :

Strange. Did you update from trunk?

$ bzr clone lp:cardapio
$ cd cardapio/cardapio
$ sudo make install

(then cleaning up the downloaded files)
$ cd ..
$ sudo rm -rf cardapio

Revision history for this message
faiwer (faiwer) wrote :

No, before I use
$ sudo aptitude update
$ sudo aptitude upgrate

Now, after using your code, I see this empty window too.

Revision history for this message
Uri Herrera (uriherrera) wrote :

Well I can confirm it's not fixed yet, the empty window still appears.

Revision history for this message
Thiago Teixeira (tvst) wrote :

Ok, I pushed a possible fix a few hours ago. Let me know if the latest version in trunk or in the unstable PPA (they should be the same) fixes the problem for you.

Revision history for this message
faiwer (faiwer) wrote :

faiwer@faiwer-desktop:~$ cardapio show-near-mouse
Exception AttributeError: "'CardapioPlugin' object has no attribute 'package_monitor'" in <bound method CardapioPlugin.__del__ of <software_center.CardapioPlugin object at 0x9ddfb2c>> ignored

but cardapio working :) thx

Revision history for this message
Thiago Teixeira (tvst) wrote :

Nice, so I'm going to mark this as resolved.

That Exception you posted above is just the way "fails graciously" when a given plugin can't load. In this case it seems that the Software Center plugin is having some problems. I'll see what's up with that — it's probably some change that took place in Precise...

Changed in cardapio:
status: New → Fix Released
Revision history for this message
Rainer (rainer-krugs) wrote :

Any news on this problem? I guess I have the same one on Precise, unstable ppa:

colmod:~$ cardapio

** (cardapio:18859): WARNING **: Binding '<Super>space' failed!
Traceback (most recent call last):
  File "/usr/bin/cardapio", line 198, in <module>
    cardapio_show(centered = True)
  File "/usr/bin/cardapio", line 113, in cardapio_show
    start_cardapio(show = position)
  File "/usr/bin/cardapio", line 45, in start_cardapio
    Cardapio(show = show)
  File "/usr/lib/cardapio/Cardapio.py", line 196, in __init__
    elif show == Constants.SHOW_CENTERED : self._show()
  File "/usr/lib/cardapio/Cardapio.py", line 1755, in _show
    self._restore_dimensions(x, y, force_anchor_right = False, force_anchor_bottom = False)
  File "/usr/lib/cardapio/Cardapio.py", line 1641, in _restore_dimensions
    x, y, anchor_right, anchor_bottom = self._get_coordinates_inside_screen(x, y, force_anchor_right, force_anchor_bottom)
  File "/usr/lib/cardapio/Cardapio.py", line 1589, in _get_coordinates_inside_screen
    screen_x, screen_y, screen_width, screen_height = self._view.get_screen_dimensions()
  File "/usr/lib/cardapio/CardapioGtkView.py", line 434, in get_screen_dimensions
    screen_dimensions = self._root_window.property_get(screen_property)[2]
TypeError: 'NoneType' object has no attribute '__getitem__'

Cheers,

Rainer

Revision history for this message
Ryan Schulman (schulmanworks) wrote :

Thiago, I'm trying to run your code. I'm very new to this. I registered and tried to login via terminal, but it says my username is not registered. What do I do?

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.