Preference window of kupfer doesn't open

Bug #841867 reported by Johannes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kupfer
In Progress
Undecided
Unassigned

Bug Description

I could not get to the preference window and only get the following error when I started kupfer from a terminal:
kupfer
Kupfer: A free software (GPLv3+) launcher
 Copyright © 2007--2011 Ulrik Sverdrup with others
 http://kaizer.se/wiki/kupfer/

[kupfer.core.sources] SourcePickler: Error loading /home/johannes/.cache/kupfer/kOqeQrgq3epiIo0mjl6AuSw-v4.pickle.gz:
Traceback (most recent call last):
  File "/usr/share/kupfer/kupfer/icons.py", line 256, in _setup_icon_renderer
    _icon_render_change(setctl)
  File "/usr/share/kupfer/kupfer/icons.py", line 260, in _icon_render_change
    renderer_dict = setctl.get_preferred_alternative('icon_renderer')
  File "/usr/share/kupfer/kupfer/core/settings.py", line 410, in get_preferred_alternative
    alternatives = self._alternatives[category_key]
KeyError: 'icon_renderer'
/usr/share/kupfer/kupfer/ui/browser.py:2087: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
  self.window.realize()
/usr/share/kupfer/kupfer/ui/browser.py:636: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
  requisition.width, requisition.height = self.__child.size_request ()

** (kupfer.py:9616): CRITICAL **: cr_parser_new_from_buf: assertion `a_buf && a_len' failed

** (kupfer.py:9616): CRITICAL **: cr_parser_set_sac_handler: assertion `a_this' failed

(kupfer.py:9616): librsvg-WARNING **: Error setting CSS SAC handler

** (kupfer.py:9616): CRITICAL **: cr_parser_destroy: assertion `a_this && PRIVATE (a_this)' failed
[kupfer.ui.browser] WindowController: Trying to register <Super>space to spawn kupfer.. success

** (kupfer.py:9616): CRITICAL **: cr_parser_new_from_buf: assertion `a_buf && a_len' failed

** (kupfer.py:9616): CRITICAL **: cr_parser_set_sac_handler: assertion `a_this' failed

(kupfer.py:9616): librsvg-WARNING **: Error setting CSS SAC handler

** (kupfer.py:9616): CRITICAL **: cr_parser_destroy: assertion `a_this && PRIVATE (a_this)' failed

** (kupfer.py:9616): CRITICAL **: cr_parser_new_from_buf: assertion `a_buf && a_len' failed

** (kupfer.py:9616): CRITICAL **: cr_parser_set_sac_handler: assertion `a_this' failed

(kupfer.py:9616): librsvg-WARNING **: Error setting CSS SAC handler

** (kupfer.py:9616): CRITICAL **: cr_parser_destroy: assertion `a_this && PRIVATE (a_this)' failed
Traceback (most recent call last):
  File "/usr/share/kupfer/kupfer/ui/browser.py", line 1885, in mitem_handler
    callback(ui_ctx)
  File "/usr/share/kupfer/kupfer/kupferui.py", line 62, in show_preferences
    win = preferences.GetPreferencesWindowController()
  File "/usr/share/kupfer/kupfer/ui/preferences.py", line 875, in GetPreferencesWindowController
    _preferences_window = PreferencesWindowController()
  File "/usr/share/kupfer/kupfer/ui/preferences.py", line 119, in __init__
    self._update_alternative_combobox('terminal', terminal_combobox)
  File "/usr/share/kupfer/kupfer/ui/preferences.py", line 783, in _update_alternative_combobox
    setctl.get_valid_alternative_ids(category_key), key=lambda t:t[1])
  File "/usr/share/kupfer/kupfer/utils.py", line 77, in locale_sort
    seq = seq if isinstance(seq, list) else list(seq)
  File "/usr/share/kupfer/kupfer/core/settings.py", line 396, in get_valid_alternative_ids
    validator = self._alternative_validators[category_key]
KeyError: 'terminal'

Don't know if this is probably already reported but I didn't find the exact error message.

Revision history for this message
David Schneider (dnschneid) wrote :

This is a guess as I'm not familiar with the code there, but it sounds like Kupfer couldn't find any candidates for a terminal emulator on your system. What do you use for a terminal?

This will probably work as a workaround:
in file /usr/share/kupfer/kupfer/core/settings.py, add the following line at line 396 (the line right after the """s for get_valid_alternative_ids):

if not category_key in self._alternative_validators: return

The equivalent patch is attached, although this doesn't address the issue that Kupfer wasn't able to find a terminal. You'll have to configure it yourself using the Custom Terminal plugin.

Revision history for this message
Johannes (j-hannes) wrote :

I use Xfce and therefore I use the xfce-terminal
terminal --version
terminal 0.4.8 (Xfce 4.8.0)

Copyright (c) 2003-2011
 The Xfce development team. All rights reserved.

Written by Benedikt Meurer <email address hidden>
and Nick Schermer <email address hidden>.

Please report bugs to <http://bugzilla.xfce.org/>.

Don't know if there's something special about it.

Revision history for this message
Johannes (j-hannes) wrote :

btw thanks for your help

Revision history for this message
Johannes (j-hannes) wrote :

Also the proposed patch works, just tried it and it does indeed solve my problem.

Revision history for this message
David Schneider (dnschneid) wrote :

Ah, yeah, we've seen that problem before (on IRC, I think).
Kupfer expects the Debian (or at least Ubuntu's) packaging of xfce, which has it as xfce4-terminal, so it doesn't have "terminal" in its database.
What Kupfer should really have is a fallback on Debian's alternatives or mime or whatever more standard ways of discovering terminal emulators there are.

At a minimum, at least, Kupfer won't crash with this patch :)

Changed in kupfer:
status: New → Confirmed
status: Confirmed → In Progress
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.