ValueError: unknown locale: en_NG

Bug #482386 reported by EdC
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python2.6 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: software-center

Hi

When I try to run Ubuntu Software Center from the application menu, I get the timer for a while and then nothing.

Ubuntu 9.10

software-center:
  Installed: 1.0.2
  Candidate: 1.0.2
  Version table:
 *** 1.0.2 0
        500 http://nl.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status
kennacurl@kennacurl-laptop:~$

Is there a work around for me in the meantime? Can I change my locale? - if so how?

From the command line I get:

kennacurl@kennacurl-laptop:~$ /usr/bin/software-center
Traceback (most recent call last):
  File "/usr/bin/software-center", line 80, in <module>
    app = SoftwareCenterApp(datadir, xapian_base_path)
  File "/usr/share/software-center/softwarecenter/app.py", line 140, in __init__
    self.icons, datadir)
  File "/usr/share/software-center/softwarecenter/view/availablepane.py", line 58, in __init__
    SoftwarePane.__init__(self, cache, db, icons, datadir)
  File "/usr/share/software-center/softwarecenter/view/softwarepane.py", line 92, in __init__
    self.datadir)
  File "/usr/share/software-center/softwarecenter/view/appdetailsview.py", line 102, in __init__
    self.aptd_client = client.AptClient()
  File "/usr/lib/python2.6/dist-packages/aptdaemon/client.py", line 382, in __init__
    self._locale = "%s.%s" % locale.getdefaultlocale()
  File "/usr/lib/python2.6/locale.py", line 478, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.6/locale.py", line 410, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: en_NG
kennacurl@kennacurl-laptop:

Revision history for this message
bigbrovar (bigbrovar) wrote :

This Bug is a shame. This issue was first reported on hardy heron when it caused many problems for people who select Nigeria as their location, Things like printer-config-settings, alacarte, and even problems with 3rd party applications like Elisa etc. The main cause of this error is due to the locale set during Ubuntu
installation (Nigeria, en_NG). A fix to this problem is adding

'en_ng': 'en_GB.ISO8859-1',
'en_ng.iso88591': 'en_GB.ISO8859-1',

to usr/lib/python2.6/locale.py

Please someone fix this problem already. Has it stands as long as this problem persist. No body in Nigeria would be able to use software center ( or any other tool affected by this issue)

Revision history for this message
Philip Muškovac (yofel) wrote :

That would be an issue in python then.

affects: software-center (Ubuntu) → python2.6 (Ubuntu)
Revision history for this message
Philip Muškovac (yofel) wrote :

Found bug 236858 where this already happened. Fixed at the wrong place I guess.

Revision history for this message
Philip Muškovac (yofel) wrote :

Confrimed when using en_NG as the locale setting. en_NG.UTF-8 works fine though.

Changed in python2.6 (Ubuntu):
status: New → Confirmed
Revision history for this message
bigbrovar (bigbrovar) wrote :

someone should please please fix this bug already, I just encountered same thing when I installed Kubuntu karmic on my brothers laptop, I couldn't even search with KpackageKit, or even get jockey-kde to work until I changed my locale to UK. I don't have a problem working round this bug but there are millions in my country who will be trying ubuntu for the first time, this bug renders, software-center, kpackagekit, gnome-menu-editor, and lots of other python based applications unusable. At least I was able to trace the problem here https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/482386/comments/1 all that is needed is someone with strings within ubuntu to apply the relevant fix which could then be back-ported to hardy, intrepid and jaunty. Please I know my country is small and not important but we have lots of people who would like to use ubuntu too. This bug is over 2 years old already and all that is needed is add 'en_ng': 'en_GB.ISO8859-1',
'en_ng.iso88591': 'en_GB.ISO8859-1', to to usr/lib/python2.6/locale.py .. If this were some other "important country" affected by this it would have been fixed in a matter of minutes. Please someone should do something, this bug is a major deal breaker for Nigerians and its over 2 years and running

Revision history for this message
Philip Muškovac (yofel) wrote :

Hi, can you please check if this bug still exists after installing all Updates? (Make sure that you have the karmic-updates repository enabled in software-sources). This should have been fixed in bug 223281

Changed in python2.6 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
bigbrovar (bigbrovar) wrote :

@Philip Muškovac Indeed it seems the bug has been fixed. I just did a full update of karmic on a fresh install and I don't have the problem any more. I wonder why I still had it on the fresh kubuntu I just installed some moments ago, probably because I didn't reboot the machine, either way I am deeply sorry for being such a jerk about this. Thanks and really appreciate all the work you guys are doing

Revision history for this message
Kayode Odusote (odusote-kayode) wrote :

This bug persists in python2.7. The solution given by @bigbrovar

"A fix to this problem is adding

'en_ng': 'en_GB.ISO8859-1',
'en_ng.iso88591': 'en_GB.ISO8859-1',

to usr/lib/python2.6/locale.py" works with phthon2.7 as well.

Hope this would be fixed permanently to save Nigerians the headache of failed upgrade, etc.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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