Package: python-mysqldb
Version: 1.1.6-1
Severity: normal


mysqldb + mod_python recently broke for me (perhaps with Python 2.3.5? not sure). Everything was working fine until today, even though I upgraded to 2.3.5 a few days ago. Apache got restarted today, though.

The following script works when executed from the command line:

-----
#! /usr/bin/env python2.3

import MySQLdb

host="localhost"
user="test"
passwd="test"
dbname="test"

db_connection = MySQLdb.connect(host,user,passwd,dbname)
-----

However, the following script:

-----
from mod_python import apache

import MySQLdb

def handler(req):
req.content_type = "text/html; charset=UTF-8"
req.send_http_header()
req.write("<html><body><code>")
req.write("Entered handler...<br>\n")
db = MySQLdb.connect( host="localhost", user="test", passwd="test", db="test" )
req.write("OK it works!\n")
req.write("</code></body></html>")
return apache.OK
----


Returns this error to the browser:

Entered handler...
Mod_python error: "PythonHandler testmysqldb" Traceback (most recent
call last): File
"/usr/lib/python2.3/site-packages/mod_python/apache.py", line 193, in
Dispatch result = object(req) File
"/home/aarre/websites/laakshmi/test/testmysqldb.py", line 13, in handler
db = MySQLdb.connect( host="localhost", user="test", passwd="test",
db="test" ) File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py",
line 64, in Connect return Connection(*args, **kwargs) File
"/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 101, in
__init__ self.converter[types.StringType] = self.string_literal
TypeError: object does not support item assignment






-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-k7
Locale: LANG=POSIX, LC_CTYPE=POSIX (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to POSIX)


Versions of packages python-mysqldb depends on:
ii python 2.3.5-1 An interactive high-level object-o
ii python2.3-mysqldb 1.1.6-1 A Python interface to MySQL


-- no debconf information


-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Reply via email to