[mod_python] TypeError: help (not enough non-keyword args)

Rich Pinder rpinder at usc.edu
Sat Sep 25 09:04:31 EDT 2004


I have a modpython script that is working fine for a couple years now.
I'm adding a second web form, so I defined a second method in the same 
.py script, added/modified the fields needed for this new insert, but 
get the error below.

(the original method that is working fine has 7 arguments btw - this '3 
given' is perplexing)

Can you suggest something simple I'm overlooking?

Thanks
Rich


ERROR:

TypeError: sendinfofup() takes exactly 14 non-keyword arguments (3 given)


CODE:

def sendinfofup(frm_id, frm_zip, frm_Email1, frm_Resident_1996, 
frm_Resident_1997, frm_Resident_1998, frm_Resident_1999, frm\
_Resident_2000, frm_Resident_2001, frm_Resident_2002, frm_Resident_2003, 
frm_Resident_2004, frm_ResidentOutOfCalif, frm_Text\
):

 TABLE_NAME = 'ctsfup2004'

 con = kinterbasdb.connect(
         dsn="/xxx.gdb",
         user="xxxxxx",
         password="xxxxxx"
                )

 cur = con.cursor()

 newContact2 = (
          (frm_id, frm_zip, frm_Email1, frm_Resident_1996, 
frm_Resident_1997, frm_Resident_1998, frm_Resident_1999, frm_Resi\
dent_2000, frm_Resident_2001, frm_Resident_2002, frm_Resident_2003, 
frm_Resident_2004, frm_ResidentOutOfCalif, frm_Text))


 cur.execute("insert into TABLE_NAME(id, zip5, email, resident_96, 
resident_97, resident_98, resident_99, resident_00, resid\
ent_01, resident_02, resident_03, resident_04, residentoutofcalif, sugg) 
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",\
 newContact2)

 con.commit()


More information about the Mod_python mailing list