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 <arnau@debian.org>; Source for python-cheetah is src:cheetah.

Reported by: Carles Muñoz Gorriz <carlesmu@internautas.org>

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

Severity: important

Tags: patch

Found in version cheetah/2.4.2.1-1

Fixed in version cheetah/2.4.4-1

Done: Arnaud Fontaine <arnau@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://sourceforge.net/mailarchive/message.php?msg_id=26807814

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Arnaud Fontaine <arnau@debian.org>:
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 <carlesmu@internautas.org>:
New Bug report received and forwarded. Copy sent to Arnaud Fontaine <arnau@debian.org>. (Mon, 07 Jun 2010 21:33:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Carles Muñoz Gorriz <carlesmu@internautas.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
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
Version: 2.4.2.1-1
Severity: important
Tags: patch

Hi,

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 test.py

You get a UnicodeEncodeException:
Traceback (most recent call last):
  File "/usr/bin/cheetah-compile", line 3, in <module>
    _cheetah_compile()
  File "/usr/lib/pymodules/python2.5/Cheetah/CheetahWrapper.py", line 625, in _cheetah_compile
    CheetahWrapper().main()
  File "/usr/lib/pymodules/python2.5/Cheetah/CheetahWrapper.py", line 148, in main
    meth()
  File "/usr/lib/pymodules/python2.5/Cheetah/CheetahWrapper.py", line 231, in compile
    self._compileOrFill()
  File "/usr/lib/pymodules/python2.5/Cheetah/CheetahWrapper.py", line 380, in _compileOrFill
    self._compileOrFillBundle(b)
  File "/usr/lib/pymodules/python2.5/Cheetah/CheetahWrapper.py", line 596, in _compileOrFillBundle
    compilerSettings=compilerSettings)
  File "/usr/lib/pymodules/python2.5/Cheetah/Template.py", line 744, in compile
    generatedModuleCode = compiler.getModuleCode()
  File "/usr/lib/pymodules/python2.5/Cheetah/Compiler.py", line 1879, in getModuleCode
    return self.wrapModuleDef()
  File "/usr/lib/pymodules/python2.5/Cheetah/Compiler.py", line 1933, in wrapModuleDef
    'classes': self.classDefs(),
  File "/usr/lib/pymodules/python2.5/Cheetah/Compiler.py", line 1981, in classDefs
    classDefs = [klass.classDef() for klass in self._finishedClasses()]
  File "/usr/lib/pymodules/python2.5/Cheetah/Compiler.py", line 1423, in classDef
    return self.wrapClassDef()
  File "/usr/lib/pymodules/python2.5/Cheetah/Compiler.py", line 1449, in wrapClassDef
    addAttributes()
  File "/usr/lib/pymodules/python2.5/Cheetah/Compiler.py", line 1445, in addAttributes
    self.attributes(),
  File "/usr/lib/pymodules/python2.5/Cheetah/Compiler.py", 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 Compiler.py, but I don't know if it can raise other errors.


regards,
-- 
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
[Compiler.py.diff (text/x-c++, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Arnaud Fontaine <arnau@debian.org>:
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 <carlesmu@internautas.org>:
Extra info received and forwarded to list. Copy sent to Arnaud Fontaine <arnau@debian.org>. (Tue, 08 Jun 2010 05:33:08 GMT) Full text and rfc822 format available.

Message #10 received at 584966@bugs.debian.org (full text, mbox):

From: Carles Muñoz Gorriz <carlesmu@internautas.org>
To: 584966@bugs.debian.org
Subject: ignore previous patch
Date: Tue, 08 Jun 2010 06:53:27 +0200
[Message part 1 (text/plain, inline)]
Hi,

There was a missed print statement in the previous patch.

Please, use this.

regards,
-- 
Carles Muñoz Gorriz
[Compiler.py.diff (text/x-patch, attachment)]

Set Bug forwarded-to-address to 'http://sourceforge.net/mailarchive/message.php?msg_id=26807814'. Request was from Arnaud Fontaine <arnau@debian.org> to control@bugs.debian.org. (Sun, 26 Dec 2010 09:45:02 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from arnau@users.alioth.debian.org to control@bugs.debian.org. (Sun, 26 Dec 2010 09:45:05 GMT) Full text and rfc822 format available.

Reply sent to Arnaud Fontaine <arnau@debian.org>:
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 <carlesmu@internautas.org>:
Bug acknowledged by developer. (Sun, 26 Dec 2010 10:06:04 GMT) Full text and rfc822 format available.

Message #19 received at 584966-close@bugs.debian.org (full text, mbox):

From: Arnaud Fontaine <arnau@debian.org>
To: 584966-close@bugs.debian.org
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:

cheetah_2.4.4-1.debian.tar.gz
  to main/c/cheetah/cheetah_2.4.4-1.debian.tar.gz
cheetah_2.4.4-1.dsc
  to main/c/cheetah/cheetah_2.4.4-1.dsc
cheetah_2.4.4.orig.tar.gz
  to main/c/cheetah/cheetah_2.4.4.orig.tar.gz
python-cheetah_2.4.4-1_amd64.deb
  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
attached.

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

Debian distribution maintenance software
pp.
Arnaud Fontaine <arnau@debian.org> (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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
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 <arnau@debian.org>
Changed-By: Arnaud Fontaine <arnau@debian.org>
Description: 
 python-cheetah - text-based template engine and Python code generator
Closes: 584966 605422 606517
Changes: 
 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.
Checksums-Sha1: 
 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
Checksums-Sha256: 
 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
Files: 
 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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk0XDxoACgkQvfKiIF42GdP7LwCdHn1/jcCDA7bF79T5UdDwKCUe
UFMAnRH3b5u9PT5IaAWE/HuYRuBlM1Ri
=CHaO
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (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 <owner@bugs.debian.org>. Last modified: Fri Apr 18 21:26:51 2014; Machine Name: buxtehude.debian.org

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