locale.normalize does not accept unicode: TypeError in normalize(): character mapping must return integer, None or unicode

Bug #824734 reported by RobinJ
124
This bug affects 26 people
Affects Status Importance Assigned to Milestone
Python
Fix Released
Unknown
python2.7 (Ubuntu)
Fix Released
High
Barry Warsaw
Oneiric
Fix Released
High
Barry Warsaw

Bug Description

locale.normalize does accept unicode strings anymore in python 2.7.2:

python2.7 -c "import locale; locale.normalize(u'en_US')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/locale.py", line 358, in normalize
    fullname = localename.translate(_ascii_lower_map)
TypeError: character mapping must return integer, None or unicode

This breaks various packages, like updatemanager, playonlinux (bug 825421) and aptdaemon (bug 825056)

reported upstream:
http://bugs.python.org/issue12752

Revision history for this message
RobinJ (robinj) wrote :
RobinJ (robinj)
visibility: private → public
Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Zsolt Szilagyi (esgott) wrote :

It happened for me when clicking on "Install updates".

Revision history for this message
BertN45 (lammert-nijhof) wrote :

It happened pressing the Check button

Revision history for this message
Detlef Lechner (detlef-lechner) wrote :

I am affected too.
~$ uname -a
Linux T61 3.0.0-7-server #9-Ubuntu SMP Fri Jul 29 23:09:08 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Julian Taylor (jtaylor) wrote :

This is a regression introduced in python 2.7.2:
http://bugs.python.org/issue12752

Revision history for this message
Julian Taylor (jtaylor) wrote :

caused by python 2.7.2 regression

affects: update-manager (Ubuntu) → python2.7 (Ubuntu)
description: updated
tags: added: python2.7
summary: - update-manager crashed with TypeError in normalize(): character mapping
- must return integer, None or unicode
+ locale.normalize does not accept unicode: TypeError in normalize():
+ character mapping must return integer, None or unicode
Changed in python2.7 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
tags: added: regression-release
Changed in python2.7 (Ubuntu Oneiric):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Barry Warsaw (barry) wrote :

I have submitted a potential patch to the Python tracker. I'd like to get a little feedback on it before applying it both upstream and in Ubuntu.

Changed in python2.7 (Ubuntu Oneiric):
assignee: Canonical Foundations Team (canonical-foundations) → Barry Warsaw (barry)
milestone: none → ubuntu-11.10-beta-1
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.7 - 2.7.2-5

---------------
python2.7 (2.7.2-5) unstable; urgency=low

  * Update to 20110816, taken from the 2.7 branch.
    - Fix issue#12752. LP: #824734.
  * Don't run test_threading on the kfreebsd-i386 buildd.
 -- Matthias Klose <email address hidden> Tue, 16 Aug 2011 08:33:31 +0200

Changed in python2.7 (Ubuntu Oneiric):
status: In Progress → Fix Released
Changed in python:
status: Unknown → Fix Released
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.