alacarte crashed with ValueError in _parse_localename()

Bug #645785 reported by Данило Шеган
58
This bug affects 13 people
Affects Status Importance Assigned to Milestone
python2.6 (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: python2.6

Bug #223281 is back (if it ever went away: my Lucid server installation has the same problem — I am not sure if I should re-open that bug). It fails for locale sr_RS (default Serbian locale on Ubuntu). Other applications are affected as well (eg. gtg and update-manager, though update-manager keeps working even if it prints out a traceback on stderr).

For sr_RS problem seems to be that an old X.org locale.alias is used to initialize the alias table in locale.py (i.e. there's no mention of sr_RS in there).

Simplest way to reproduce this is to do:

  $ LANG=sr_RS python
  >>> import locale
  >>> locale.getdefaultlocale()

Bug #539457 seems to be another duplicate (closed after not responded to needs-info, though requested information is in the traceback: en_NG is the locale that it fails with.

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: alacarte 0.13.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
CheckboxSubmission: f6bb8a2d0bca1d40dc30f4f97731b797
CheckboxSystem: b633b4f40868d491c2ae5b50030ce6f3
Date: Wed Sep 22 16:31:34 2010
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/alacarte
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python -OOt /usr/bin/alacarte
ProcEnviron:
 PATH=(custom, user)
 LANG=sr_RS
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/alacarte']
SourcePackage: alacarte
Title: alacarte crashed with ValueError in _parse_localename()
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Revision history for this message
Данило Шеган (danilo) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Данило Шеган (danilo) wrote :

Workaround for any locale exhibiting this problem: append ".UTF-8" to the LANG variable before running a program.

I.e. to run "alacarte", do "LANG=$LANG.UTF-8 alacarte".

The list of affected locales I could find from other bug reports so far: sr_RS, en_NG, mn_IN

visibility: private → public
Revision history for this message
Данило Шеган (danilo) wrote :

en_NG and mn_IN are not present in /usr/share/X11/locale/locale.alias so just updating the locale_alias dict in locale.py won't help them. It will help for sr_RS though.

Revision history for this message
R. David Murray (rdmurray) wrote :

Note that sr_RS was fixed upstream (the locale.py table updated) in http://bugs.python.org/issue8374 and http://bugs.python.org/issue6668. It was not backported to 2.6 because the update changes other existing locale information.

It is worth reading the comments in issue8374 about getdefaultlocale and how fragile it is.

Revision history for this message
Ladislav Urošević (urosldp) wrote :

More then one year old bug, still unassigned. I wonder why?

Changed in python2.6 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

Support for this version has ended

Changed in python2.6 (Ubuntu):
status: Confirmed → Invalid
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.