I'm trying to connect to a mysql db with some python code running under mod_python and I get this error which I can't make a lot of sense of. Can you help?
The connection works interactively.
versions :
- mysql Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i386) using readline 4.3
- mod_python 3.1.3-3
- Python 2.3.5 (#2, Sep 4 2005, 22:01:42)
the log: [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] Traceback (most recent call last):\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] File "/usr/lib/python2.3/site-packages/wsgiref/handlers.py", line 92, in run\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] self.result = application(self.environ, self.start_response)\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] File "/usr/lib/python2.3/site-packages/web.py", line 893, in wsgifunc\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] _load(e)\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] File "/usr/lib/python2.3/site-packages/web.py", line 1111, in _load\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] connect(db_parameters)\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] File "/usr/lib/python2.3/site-packages/web.py", line 265, in connect\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] ctx.db = db.connect(kw)\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] File "/usr/lib/python2.3/site-packages/MySQLdb/init.py", line 66, in Connect\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] return Connection(args, *kwargs)\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 152, in init\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] self.converter[types.UnicodeType] = unicode_literal\n [Wed Jan 25 11:59:13 2006][error][client 210.48.13.41] TypeError: object does not support item assignment\n
Thanks.
Antoine
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm trying to connect to a mysql db with some python code running under mod_python and I get this error which I can't make a lot of sense of. Can you help?
The connection works interactively.
versions :
- mysql Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i386) using readline 4.3
- mod_python 3.1.3-3
- Python 2.3.5 (#2, Sep 4 2005, 22:01:42)
the log:
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] Traceback (most recent call last):\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] File "/usr/lib/python2.3/site-packages/wsgiref/handlers.py", line 92, in run\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] self.result = application(self.environ, self.start_response)\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] File "/usr/lib/python2.3/site-packages/web.py", line 893, in wsgifunc\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] _load(e)\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] File "/usr/lib/python2.3/site-packages/web.py", line 1111, in _load\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] connect(db_parameters)\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] File "/usr/lib/python2.3/site-packages/web.py", line 265, in connect\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] ctx.db = db.connect(kw)\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] File "/usr/lib/python2.3/site-packages/MySQLdb/init.py", line 66, in Connect\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] return Connection(args, *kwargs)\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 152, in init\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] self.converter[types.UnicodeType] = unicode_literal\n
[Wed Jan 25 11:59:13 2006] [error] [client 210.48.13.41] TypeError: object does not support item assignment\n
Thanks.
Antoine