Rich Pinder
rpinder at usc.edu
Mon Sep 27 08:08:24 EDT 2004
I have a mod_python script that has worked fine for a couple years now. It has a single function defined within the script. I'm adding a second web form to my site, so I defined a second function in the same .py script, added/modified the fields needed for the new insert, but get the error below. A python only script (without the web stuff) confirms I can insert data into the table, using the specified user id - so I know the database is configured correctly. And as I say, the original function within the .py script continues to work just fine, so mod_python is configured correctly. Thanks in advance for your thoughts. Rich Config: Apache 1.3 Python 2.2 (#1, Mar 26 2002, 15:46:04) [GCC 2.95.3 20010315 (SuSE)] on linux2 Mod_Python 2.7 Kinterbasdb 3.0.2 ERROR: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most recent call last): File "/usr/lib/apache/lib/python2.2/site-packages/mod_python/apache.py", line 193, in Dispatch result = object(req) File "/usr/lib/apache/lib/python2.2/site-packages/mod_python/publisher.py", line 171, in handler result = apply(object, (), args) TypeError: sendinfofup() takes exactly 14 non-keyword arguments (3 given) HTML <form action="https://www.xxxxx.org/ctspython/ctsform/sendinfofup" method="post" name="form1"> CODE in .PY file: 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() ...
|