Hi all Continuing my personal sage of woes with zpt+sql+python here are some details. Following is the error message as I click on the submit button (defined in "index_html" which invokes "pyinsert" which in turn user the ZSQL method "insert"). It says "Missing Input". What is it that I am missing ? TIA Chetan -------------Error Message from Zope------------ Traceback (innermost last): File /home1/sepg/Site/lib/python/ZPublisher/Publish.py, line 150, in publish_module File /home1/sepg/Site/lib/python/Products/Localizer/__init__.py, line 65, in new_publish File /home1/sepg/Site/lib/python/ZPublisher/Publish.py, line 114, in publish File /home1/sepg/Site/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook (Object: Test) File /home1/sepg/Site/lib/python/ZPublisher/Publish.py, line 98, in publish File /home1/sepg/Site/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: pyinsert) File /home1/sepg/Site/lib/python/ZPublisher/Publish.py, line 39, in call_object (Object: pyinsert) File /home1/sepg/Site/lib/python/Shared/DC/Scripts/Bindings.py, line 252, in __call__ (Object: pyinsert) File /home1/sepg/Site/lib/python/Shared/DC/Scripts/Bindings.py, line 283, in _bindAndExec (Object: pyinsert) File /home1/sepg/Site/lib/python/Products/PythonScripts/PythonScript.py, line 291, in _exec (Object: pyinsert) (Info: ({'script': <PythonScript instance at 91265d0>, 'context': <Folder instance at 8f8a6f0>, 'container': <Folder instance at 8f8a6f0>, 'traverse_subpath': []}, (), {}, None)) File Script (Python), line 7, in pyinsert File /home1/sepg/Site/lib/python/Shared/DC/ZRDB/DA.py, line 414, in __call__ (Object: insert) File /home1/sepg/Site/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__ (Object: <string>) File /home1/sepg/Site/lib/python/Shared/DC/ZRDB/sqlvar.py, line 99, in render (Object: EmpID) Missing Input: (see above) ------------------------------------------------------------------------------------ -------------index_html------------ <form action="pyinsert"> <input type="text" name="EmpID"><br> <input type="text" name="FirstName"><br> <input type="text" name="MidName"><br> <input type="text" name="LastName"><br> <input type="text" name="GroupName"><br> <input type="hidden" name="page" value="/"> <input type="submit"> </form> -------------------------------------- ------------pyinsert---------------- request = container.REQUEST RESPONSE = request.RESPONSE sql=container.insert sql(EmpID="EmpID",FirstName="FirstName", MidName="MidName", LastName="LastName",GroupName="GroupName") RESPONSE.redirect(page) -------------------------------------- -----------insert--------------------- insert into ActChart.EmpData (EmpID, FirstName, MidName, LastName, GroupName) values( <dtml-sqlvar EmpID type=int>, <dtml-sqlvar FirstName type=string>, <dtml-sqlvar MidName type=string> , <dtml-sqlvar LastName type=string>, <dtml-sqlvar GroupName type=string> ) ---------------------------------------- Regards, Chetan
Chetan Kumar writes:
... Following is the error message as I click on the submit button (defined in "index_html" which invokes "pyinsert" which in turn user the ZSQL method "insert"). It says "Missing Input". What is it that I am missing ? ... File /home1/sepg/Site/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__ (Object: <string>) File /home1/sepg/Site/lib/python/Shared/DC/ZRDB/sqlvar.py, line 99, in render (Object: EmpID) Missing Input: (see above) For the future:
When you report problems, we need *both* the (complete!) Error Type/Value information and (at least) the tailing lines of the traceback. The problem is a "<dtml-sqlvar VARIABLE ...>". This "VARIABLE" is not defined (not listed in the Z SQL Methods "Arguments", not possible to acquire and not locally defined). The "Error Value" should tell you what precisely is "VARIABLE". Probably, it's "EmpID". Dieter
participants (3)
-
Chetan Kumar -
Chris Withers -
Dieter Maurer