systemsettings crashed with AttributeError in onSystemLanguageApply(): 'QtLanguageSelector' object has no attribute 'writeSysLangSetting'

Bug #928400 reported by Dimitree
44
This bug affects 5 people
Affects Status Importance Assigned to Milestone
language-selector (Ubuntu)
Fix Released
High
Unassigned

Bug Description

After installing Ibus and trying to set it as keyboard input in System Languages on Apply System settings crashes.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: systemsettings 4:4.8.0b-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-14.23-generic 3.2.3
Uname: Linux 3.2.0-14-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Tue Feb 7 19:58:28 2012
ExecutablePath: /usr/bin/systemsettings
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120201)
ProcCmdline: /usr/bin/systemsettings -caption System\ Settings --icon preferences-system
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: kde-workspace
Title: systemsettings crashed with AttributeError in onSystemLanguageApply(): 'QtLanguageSelector' object has no attribute 'writeSysLangSetting'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Dimitree (dimitree) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kde-workspace (Ubuntu):
status: New → Confirmed
visibility: private → public
affects: kde-workspace (Ubuntu) → language-selector (Ubuntu)
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Kubuntu developers:

It turns out that I wasn't attentive enough when proposing some changes that were uploaded in language-selector 0.63; sorry about that.

We have made a conceptual change as regards which environment variables are used to represent the display language respective the regional formats. As a result we now have:
* writeSysFormatsSetting, which sets formats related LC_* variables
* writeSysLanguageSetting, which sets LANGUAGE and LANG

The rationale for the change is best summarized in the description of bug #926207.

Please let me know if there is anything else you need to know to be able to fix onSystemLanguageApply() in LanguageSelector/qt/QtLanguageSelector.py.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Fix the bug?

Revision history for this message
Xavier Besnard (xavier-besnard) wrote : Re: [Bug 928400] Re: systemsettings crashed with AttributeError in onSystemLanguageApply(): 'QtLanguageSelector' object has no attribute 'writeSysLangSetting'

Not found again. Checking ...

Le 14/02/2012 23:29, Scott Kitterman a écrit :
> Fix the bug?
>

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Scott Kitterman wrote:
> Fix the bug?

Hmm.. Who were you talking to, Scott, and what exactly are you asking?

Since I'm not using Kubuntu, I chose to just explain how the bug was introduced. One fix that might be appropriate is to simply remove the writeSysLangSetting() call:

--- LanguageSelector/qt/QtLanguageSelector.py 2012-02-08 05:15:22 +0000
+++ LanguageSelector/qt/QtLanguageSelector.py 2012-02-14 23:52:29 +0000
@@ -284,7 +284,6 @@
     def onSystemLanguageApply(self):
         (lang, code) = self.getSystemLanguage()
         self.writeSysLanguageSetting(code)
- self.writeSysLangSetting(code)
         self.updateInputMethods(code)
         KMessageBox.information(self, _("Default system Language now set to %s.") % lang, _("Language Set"))

But the bug should better be fixed by a Kubuntu developer IMO.

Revision history for this message
Scott Kitterman (kitterman) wrote :

On Tuesday, February 14, 2012 11:58:55 PM you wrote:
> Scott Kitterman wrote:
> > Fix the bug?
>
> Hmm.. Who were you talking to, Scott, and what exactly are you asking?

I think whoever breaks stuff should fix it and not just throw problems over the
fence.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Scott Kitterman wrote:
> I think whoever breaks stuff should fix it and not just throw problems over the
> fence.

As a general rule I absolutely agree. But we are talking about a package that is shared between distros, and to me it's reasonable that a Kubuntu developer gets involved in this case.

I could prepare a MP that just removes the writeSysLangSetting() call, which would stop the crashes. It might be a proper fix, but since I don't use Kubuntu, I can't tell if it actually is. For that reason I think it would be wrong to do it. Are you of another opinion?

Better to seek contact with a Kubuntu developer IMO.

Revision history for this message
Scott Kitterman (kitterman) wrote :

I don't think language selector is shared between distros, so I'm not sure what you're talking about.

LanguageSelector/qt/QtLanguageSelector.py is part of the language-selector package. I don't think there are any Kubuntu developers that work on that. In general the Ubuntu language infrastructure is nothing but a burden we try to minimize our involvement with.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2012-02-15 04:50, Scott Kitterman wrote:
> I don't think language selector is shared between distros,

I know it is.

> so I'm not sure what you're talking about.

The language-selector source package generates the Kubuntu specific binary package language-selector-kde, which contains LanguageSelector/qt/QtLanguageSelector.py.

> LanguageSelector/qt/QtLanguageSelector.py is part of the language-
> selector package. I don't think there are any Kubuntu developers that
> work on that.

Please feel free to check out which developers have worked most on the language-selector-kde files.

Unless you are interested in helping fix the bug, I suggest we stop this conversation now. It leads nowhere.

Revision history for this message
Scott Kitterman (kitterman) wrote :

It's been about 20 releases of this package since anyone from Kubuntu worked on it (I looked).

I've no idea if your proposed fix is correct. Since you're one of the major developers of the package, then I think you're much better qualified to determine what needs to be changed than anyone from Kubuntu who's never/barely ever looked at the code.

I can easily fix this problem by reverting your change if you aren't going to clean up the mess you made.

You're correct that I'm not interested in fixing this. I'm interested in you not leaving work half done for someone else.

Revision history for this message
Martin Pitt (pitti) wrote :

> In general the Ubuntu language infrastructure is nothing but a burden we try to minimize our involvement with.

FWIW, I'd be more than happy to drop language-selector-qt. It's pretty hard to test ouside a full KDE environment, so if you don't want it in Kubuntu and use the upstream control center instead, then please by all means do that. We'll switch to the gnome-control-center region panel next cycle, at that point language-selector will not be used by ubuntu any more. So at that point it either needs to be maintained by Kubuntu, or dropped entirely. I'd much favor the latter, as it is a piece of Ubuntuism we are trying to get rid of.

Revision history for this message
Martin Pitt (pitti) wrote :

Just for the record, as Kubuntu uses PackageKit as well, you can just use PackageKit's WhatProvides() functionality to get the language support packages that you need, instead of having a full (K)ubuntu-only GUI:

http://www.piware.de/2012/02/packagekitaptdaemon-what-provides-plugin-support/

Changed in language-selector (Ubuntu):
status: Confirmed → Fix Committed
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-selector - 0.70

---------------
language-selector (0.70) precise; urgency=low

  * LanguageSelector/gtk/GtkLanguageSelector.py:
    Clear the example box values before trying to generate new ones.
  * LanguageSelector/qt/QtLanguageSelector.py:
    Call for the no longer existing writeSysLangSetting() function
    removed (LP: #928400). writeSysLanguageSetting() now sets LANG.
 -- Gunnar Hjalmarsson <email address hidden> Wed, 15 Feb 2012 07:42:06 +0100

Changed in language-selector (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

Sounds like definitely something to look into at the next UDS.

Revision history for this message
Felix Geyer (debfx) wrote :

> Just for the record, as Kubuntu uses PackageKit as well,

Kubuntu doesn't use PackageKit anymore. We've replaced it with qapt/muon since natty.

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.