I have a very weird problem with mysqldb (mysql module for python). I have a file with queries for inserting records in tables. If I call the functions from the file, it works just fine. But when I try to call one of the functions from another file it throws me a
_mysql_exception.InterfaceError: (0, '')
I really don't get what I'm doing wrong here..
I call the function from buildDB.py :
The function newFormat(..) is in create.py (imported) :
from Database import Database
db = Database()
def newFormat(name, width=0, height=0, fps=0):
format_query = "INSERT INTO Format (form_name, form_width, form_height, form_fps) VALUES ('"+name+"',"+str(width)+","+str(height)+","+str(fps)+");"
rning: the sets module is deprecated
from sets import ImmutableSet
INSERT INTO Format (form_name, form_width, form_height, form_fps) VALUES ('HD',0
Traceback (most recent call last):
File "buildDB.py", line 182, in <module>
File "Z:\sequenceManager\mysql\create.py", line 52, in newFormat
File "Z:\sequenceManager\mysql\Database.py", line 19, in execute
_mysql_exceptions.InterfaceError: (0, '')
The warning has never been a problem before so I don't think it's related.