Debian Bug report logs - #584966
python-cheetah: UnicodeEncodeError when compile a utf-8 attribute

version graph

Package: python-cheetah; Maintainer for python-cheetah is Arnaud Fontaine <>; Source for python-cheetah is src:cheetah.

Reported by: Carles Muñoz Gorriz <>

Date: Mon, 7 Jun 2010 21:33:01 UTC

Severity: important

Tags: patch

Found in version cheetah/

Fixed in version cheetah/2.4.4-1

Done: Arnaud Fontaine <>

Bug is archived. No further changes may be made.

Forwarded to

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Arnaud Fontaine <>:
Bug#584966; Package python-cheetah. (Mon, 07 Jun 2010 21:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carles Muñoz Gorriz <>:
New Bug report received and forwarded. Copy sent to Arnaud Fontaine <>. (Mon, 07 Jun 2010 21:33:04 GMT) Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Carles Muñoz Gorriz <>
To: Debian Bug Tracking System <>
Subject: python-cheetah: UnicodeEncodeError when compile a utf-8 attribute
Date: Mon, 07 Jun 2010 22:57:01 +0200
[Message part 1 (text/plain, inline)]
Package: python-cheetah
Severity: important
Tags: patch


This error is new in this version, it worked in the 2.0.1-2 lenny version.

If you run:

$ echo "#encoding UTF-8" > test.tmpl; echo "#attr langs_desc={'nb': 'Norwegian (Bokmål)'}" >> test.tmpl; cheetah-compile test; python

You get a UnicodeEncodeException:
Traceback (most recent call last):
  File "/usr/bin/cheetah-compile", line 3, in <module>
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 625, in _cheetah_compile
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 148, in main
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 231, in compile
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 380, in _compileOrFill
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 596, in _compileOrFillBundle
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 744, in compile
    generatedModuleCode = compiler.getModuleCode()
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 1879, in getModuleCode
    return self.wrapModuleDef()
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 1933, in wrapModuleDef
    'classes': self.classDefs(),
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 1981, in classDefs
    classDefs = [klass.classDef() for klass in self._finishedClasses()]
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 1423, in classDef
    return self.wrapClassDef()
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 1449, in wrapClassDef
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 1445, in addAttributes
  File "/usr/lib/pymodules/python2.5/Cheetah/", line 1478, in attributes
    for attrib in self._generatedAttribs ]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 35: ordinal not in range(128)

I've get it work again after parching the, but I don't know if it can raise other errors.

Carles Muñoz Gorriz

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (700, 'testing'), (250, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-xen-686 (SMP w/2 CPU cores)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-cheetah depends on:
ii  libc6                         2.10.2-9   Embedded GNU C Library: Shared lib
ii  python                        2.5.4-9    An interactive high-level object-o
ii  python-support                1.0.8      automated rebuilding support for P
ii  python2.5                     2.5.5-6    An interactive high-level object-o

python-cheetah recommends no packages.

Versions of packages python-cheetah suggests:
pn  python-markdown             <none>       (no description available)
pn  python-memcache             <none>       (no description available)
ii  python-pygments             1.3.1+dfsg-1 syntax highlighting package writte

-- no debconf information
[ (text/x-c++, attachment)]

Information forwarded to, Arnaud Fontaine <>:
Bug#584966; Package python-cheetah. (Tue, 08 Jun 2010 05:33:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carles Muñoz Gorriz <>:
Extra info received and forwarded to list. Copy sent to Arnaud Fontaine <>. (Tue, 08 Jun 2010 05:33:08 GMT) Full text and rfc822 format available.

Message #10 received at (full text, mbox):

From: Carles Muñoz Gorriz <>
Subject: ignore previous patch
Date: Tue, 08 Jun 2010 06:53:27 +0200
[Message part 1 (text/plain, inline)]

There was a missed print statement in the previous patch.

Please, use this.

Carles Muñoz Gorriz
[ (text/x-patch, attachment)]

Set Bug forwarded-to-address to ''. Request was from Arnaud Fontaine <> to (Sun, 26 Dec 2010 09:45:02 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from to (Sun, 26 Dec 2010 09:45:05 GMT) Full text and rfc822 format available.

Reply sent to Arnaud Fontaine <>:
You have taken responsibility. (Sun, 26 Dec 2010 10:06:03 GMT) Full text and rfc822 format available.

Notification sent to Carles Muñoz Gorriz <>:
Bug acknowledged by developer. (Sun, 26 Dec 2010 10:06:04 GMT) Full text and rfc822 format available.

Message #19 received at (full text, mbox):

From: Arnaud Fontaine <>
Subject: Bug#584966: fixed in cheetah 2.4.4-1
Date: Sun, 26 Dec 2010 10:02:20 +0000
Source: cheetah
Source-Version: 2.4.4-1

We believe that the bug you reported is fixed in the latest version of
cheetah, which is due to be installed in the Debian FTP archive:

  to main/c/cheetah/cheetah_2.4.4-1.debian.tar.gz
  to main/c/cheetah/cheetah_2.4.4-1.dsc
  to main/c/cheetah/cheetah_2.4.4.orig.tar.gz
  to main/c/cheetah/python-cheetah_2.4.4-1_amd64.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Arnaud Fontaine <> (supplier of updated cheetah package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing

Hash: SHA1

Format: 1.8
Date: Sat, 25 Dec 2010 14:14:19 +0900
Source: cheetah
Binary: python-cheetah
Architecture: source amd64
Version: 2.4.4-1
Distribution: experimental
Urgency: low
Maintainer: Arnaud Fontaine <>
Changed-By: Arnaud Fontaine <>
 python-cheetah - text-based template engine and Python code generator
Closes: 584966 605422 606517
 cheetah (2.4.4-1) experimental; urgency=low
   * New upstream release.
     + Cheetah now officially supports python 2.7. Closes: #605422.
       - Require python-support >= 1.0.12 as Build-Depends.
       - Require python-all-dev >= 2.6.6-9 as Build-Depends.
       - Require python-setuptools >= 0.6.14-5 as Build-Depends.
   * debian/control:
     + Bump Standards-Version to 3.9.1. No changes needed.
   * Add debian/patches/fix_compile_with_utf8_attribute.patch:
     + UnicodeEncodeError exception raised when an attribute is an UTF-8
       string. Thanks to Carles Muñoz Gorriz. Closes: #584966.
   * debian/rules:
     + Run test suites for all Python versions during the build.
       Closes: #606517.
 9eb43a22f5feed6704def4b267416462434f285e 1399 cheetah_2.4.4-1.dsc
 c218f5d8bc97b39497680f6be9b7bd093f696e89 190989 cheetah_2.4.4.orig.tar.gz
 430636fc1f1f24570d1f007364d43eb88b4eb9fe 10024 cheetah_2.4.4-1.debian.tar.gz
 96d7cde7b02be400761df166a111ad97e0489a6e 206128 python-cheetah_2.4.4-1_amd64.deb
 33a9ebe1eea6783fec0bb7d33c2542344530d8483babd9dd500e235def86ffed 1399 cheetah_2.4.4-1.dsc
 be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550 190989 cheetah_2.4.4.orig.tar.gz
 625b4f6cbbed5ae17d3079f77d847e18280de19a26482c453fe03f2dd858d835 10024 cheetah_2.4.4-1.debian.tar.gz
 6029b655e88e204a296a8e57791dfdf259b665db6f079eb42ebd5ff2bed21fe0 206128 python-cheetah_2.4.4-1_amd64.deb
 7df4e9f9fcda1ff9cc2650147c7f2797 1399 python optional cheetah_2.4.4-1.dsc
 853917116e731afbc8c8a43c37e6ddba 190989 python optional cheetah_2.4.4.orig.tar.gz
 7d822aac9ea2c33d9ffc571a97067937 10024 python optional cheetah_2.4.4-1.debian.tar.gz
 852d13054ae33e918cbff7d88b5ca52b 206128 python optional python-cheetah_2.4.4-1_amd64.deb

Version: GnuPG v1.4.11 (GNU/Linux)


Bug archived. Request was from Debbugs Internal Request <> to (Sun, 22 May 2011 07:39:01 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Fri Apr 18 21:26:51 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.