gnome-language-selector crashed with ValueError in _build_localename(): too many values to unpack

Bug #905429 reported by Adrián on 2011-12-16
80
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Python
Fix Released
Unknown
language-selector (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
python2.7 (Ubuntu)
Medium
Unassigned

Bug Description

Start Language support.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: language-selector-gnome 0.59
ProcVersionSignature: Ubuntu 3.2.0-4.10-generic 3.2.0-rc5
Uname: Linux 3.2.0-4-generic x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Fri Dec 16 18:52:49 2011
ExecutablePath: /usr/bin/gnome-language-selector
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20111129.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/gnome-language-selector
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=hu_HU.UTF-8
PythonArgs: ['/usr/bin/gnome-language-selector']
SourcePackage: language-selector
Title: gnome-language-selector crashed with ValueError in _build_localename(): too many values to unpack
UpgradeStatus: Upgraded to precise on 2011-12-10 (6 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Adrián (jaksi) wrote :
tags: removed: need-duplicate-check
Launchpad Janitor (janitor) wrote :

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

Changed in language-selector (Ubuntu):
status: New → Confirmed
Adrián (jaksi) on 2011-12-16
visibility: private → public
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your help to improve Ubuntu by reporting this bug!

I'm able to reproduce it. I could also make the bug disappear by downgrading python-gi, python-gi-cairo and python-gobject from 3.0.3-1 to 3.0.2-4, so it seems to be caused by the latest pygobject upgrade.

Changed in pygobject (Ubuntu):
status: New → Confirmed
Justin (justin-wzy) wrote :

same problem occurs in Oneiric too

Ron Bakker (r0n) wrote :

Same problem also in 32 bit Xubuntu 12.04

Gunnar Hjalmarsson (gunnarhj) wrote :

On 2011-12-17 18:11, Justin wrote:
> same problem occurs in Oneiric too

This _exact_ problem should only affect Precise. If you see something similar in Oneiric, can you please submit a separate bug about it.

Gunnar Hjalmarsson (gunnarhj) wrote :

This issue was introduced by the _decode_value() function in pygobject/gi/overrides/Gtk.py. Assuming that there is a good reason for that function, I propose a python2.7 patch that fixes the issue.

Changed in python2.7 (Ubuntu):
status: New → Confirmed
tags: added: patch
removed: amd64 running-unity

The attachment "locale-as-unicode.diff" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Martin Pitt (pitti) wrote :

Easily reproducible python2.7 bug:

$ python -c "import locale; locale.setlocale(locale.LC_ALL, u'de_DE.UTF-8')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/locale.py", line 538, in setlocale
    locale = normalize(_build_localename(locale))
  File "/usr/lib/python2.7/locale.py", line 445, in _build_localename
    language, encoding = localetuple
ValueError: too many values to unpack

Python 3 is not affected. I'll forward this to upstream and add a workaround to language-selector.

no longer affects: pygobject (Ubuntu Precise)
no longer affects: pygobject (Ubuntu)
Changed in language-selector (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
milestone: none → precise-alpha-2
status: Confirmed → In Progress
no longer affects: python2.7 (Ubuntu Precise)
Changed in python2.7 (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Martin Pitt (pitti) wrote :

The upstream bug says it's not meant to work with unicode, and they updated the documentation instead. So setting the ubuntu task to wontfix, too.

Changed in python2.7 (Ubuntu):
status: Triaged → Won't Fix
Martin Pitt (pitti) on 2011-12-19
Changed in language-selector (Ubuntu Precise):
status: In Progress → Fix Committed
Changed in python:
status: Unknown → Fix Released
Launchpad Janitor (janitor) wrote :

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

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

  [ Martin Pitt ]
  * debian/control: Move from transitional python-gobject to python-gi.
  * Drop fontconfig/69-language-selector-ko-kr.conf: Obsolete now with the
    move to fonts-nanum.
  * LanguageSelector/gtk/GtkLanguageSelector.py: Work around python2.7 crash
    when passing an unicode value to setlocale(). (LP: #905429)

  [ Jinkyu Yi ]
  * data/pkg_depends: Add fonts-nanum*.
 -- Martin Pitt <email address hidden> Mon, 19 Dec 2011 10:34:41 +0100

Changed in language-selector (Ubuntu Precise):
status: Fix Committed → Fix Released
Sayantan Das (sayantan13) wrote :

will this be backported to ubuntu 11.10? Currently its running version 0.56.

Gunnar Hjalmarsson (gunnarhj) wrote :

On 2012-01-02 12:42, Sayantan Das wrote:
> will this be backported to ubuntu 11.10? Currently its running version 0.56.

Yes, see bug #909256.

To post a comment you must log in.
This report contains Public information  Edit
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.