>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

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to