Error message when clicking on "Session indicator" when indicator-session is not installed isn't clear enough

Bug #1017820 reported by Stéphane Guillou
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Tweak
Fix Released
Low
Ding Zhou

Bug Description

When I click on "Session indicator" from the "Tweaks" tab, I get this message: "This module encountered an error while loading". This is because I previously uninstalled "indicator-session", but the message could be clearer and tell the user why this happened.

Here is the error message:

Distribution: Ubuntu 12.04 precise
Application: Ubuntu Tweak 0.7.2-1~precise1
Desktop:ubuntu

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/main.py", line 497, in _load_module
    page = module()
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/tweaks/session.py", line 63, in __init__
    key="com.canonical.indicator.session.show-real-name-on-panel"),
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/factory.py", line 48, in create
    return getattr(cls, 'do_create')(widget, **kwargs)
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/factory.py", line 97, in do_create
    new_widget = globals().get(widget)(**kwargs)
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/gui/widgets.py", line 49, in __init__
    SettingWidget.__init__(self, key=key, default=default, type=bool, backend=backend)
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/gui/widgets.py", line 25, in __init__
    self._setting = GSetting(key=key, default=default, type=type)
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/settings/gsettings.py", line 26, in __init__
    raise Exception('Oops, Settings schema "%s" is not installed' % self.schema_id)
Exception: Oops, Settings schema "com.canonical.indicator.session" is not installed

I use Unity 3D.n

Revision history for this message
Ding Zhou (tualatrix) wrote :

It seems you use the Unity desktop, right?

Changed in ubuntu-tweak:
status: New → Incomplete
Revision history for this message
Stéphane Guillou (stephane-guillou) wrote :

Yes, I use Unity 3D. I updated the description.

description: updated
Revision history for this message
Stéphane Guillou (stephane-guillou) wrote :

Ooh. Is it because I uninstalled the indicator that shows the cog/power button and the session name?

Revision history for this message
Ding Zhou (tualatrix) wrote :

Do you mean you uninstall the indicator-session?

Revision history for this message
Stéphane Guillou (stephane-guillou) wrote :

This is embarassing... Yes, I had uninstalled indicator-session previously. Now that I reinstalled it, I can use this part of Ubuntu Tweak as intended.

Maybe a message like "You can't use this because the package indicator-sesion is not installed." would be more informative than the error message?

Revision history for this message
Ding Zhou (tualatrix) wrote :

Right, I will try to add some message like this.

Changed in ubuntu-tweak:
milestone: none → 0.7.3
assignee: nobody → Ding Zhou (tualatrix)
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Stéphane Guillou (stephane-guillou) wrote :

I edited the title and description. Thank you very much for this! Keep up the good work! Cheers.

summary: - Error when clicking on "Session indicator"
+ Error message when clicking on "Session indicator" when indicator-
+ session is not installed isn't clear enough
description: updated
Ding Zhou (tualatrix)
Changed in ubuntu-tweak:
status: Confirmed → Fix Committed
Ding Zhou (tualatrix)
Changed in ubuntu-tweak:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.