[Python-modules-team] Bug#406956: python-mysqldb: Python crash if the query result has unicode characters

Szabolcs Gyuris szimszon at oregpreshaz.eu
Mon Jan 15 10:50:09 CET 2007


Package: python-mysqldb
Version: 1.2.1-p2-4
Severity: important


I got the following error message:

File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 146, in 
execute
    query = query.encode(charset)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 81: 
ordinal not in range(128)

I have searched the web for a solution:

http://forums.mysql.com/read.php?50,123051,123051
http://forums.devshed.com/python-programming-11/help-mysqldb-module-chokes-on-unicode-data-396943.html

It seems to me that I have to upgrade the package to the latest 
version :(


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19.moria
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages python-mysqldb depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libmysqlclient15off          5.0.30-3    mysql database client library
ii  python                       2.4.4-2     An interactive high-level object-o
ii  python-central               0.5.12      register and build utility for Pyt
ii  zlib1g                       1:1.2.3-13  compression library - runtime

python-mysqldb recommends no packages.

-- no debconf information




More information about the Python-modules-team mailing list