German Display Settings "fail to load" because of locale.py
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adept (Ubuntu) |
Invalid
|
Undecided
|
Ralph Janke |
Bug Description
1.) Install Kubuntu drapper drake (6.06) using German Keyboard layout and language settings and download German language package.
2.) enable "universe" and "multiverse" in Adept
3.) download all updates using Adept
4.) open "Sytem settings" (which are "Systemeinstell
5.) Try to open the settings for display ("Anzeige")
6.) it shows a "failed to load" message ("Das Modul Anzeige kann nicht gefunden werden")
I found out that the module can be manually invoked by entering "kcmshell displayconfig" in the shell.
I got the following error messages:
[BEGIN]
Traceback (most recent call last):
File "<string>", line 8, in kcontrol_
File "/usr/lib/
return DisplayApp(parent, name)
File "/usr/lib/
self.xsetup = XSetup(
File "/usr/lib/
self.
File "/usr/lib/
for row in XorgconfCVSRead
File "/usr/lib/
fhandle = codecs.
File "/usr/lib/
setlocale(
File "/usr/lib/
return _setlocale(
locale.Error: unsupported locale setting
error: *** runFunction failure
;
[END]
Note: Line numbers might have changed a little due to my bug tracking
Upon further investigation I finally found the function call responsible for this bug:
in file /usr/lib/
oldloc = setlocale(LC_CTYPE)
setlocale(LC_CTYPE, "")
result = nl_langinfo(
setlocale(LC_CTYPE, oldloc)
calling "setlocale(
calling the function like that: setlocale(LC_CTYPE, "C") or rewriting the code like this:
try:
setlocale(
except:
pass
fixes the problem.
Best regards,
Eric
I can't reproduce this on feisty. Is that Bug still current?
Thanks.