MySQL InterfaceError
Joe
joe at incomps.com
Tue Jun 5 15:15:22 EDT 2007
>File "build/bdist.linux-i686/egg/MySQLdb/cursors.py", line 147, in execute
> charset = db.character_set_name()
>
>InterfaceError: (0, '')
We got it working. It was caused by passing a database connection to a
module:
import MySQLdb
import module_name
connection = MySQLdb.connect(host='localhost', user='user',
passwd='password', db='database')
module = module_name.ClassName(connection)
But, when the connection was made within the module itself, it would work
flawlessly every time. Can someone explain to me why this is?
Jough
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070605/29c28df4/attachment.html>
More information about the Python-list
mailing list