i want to know what is the problem in this code

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Mon Nov 26 09:55:37 CET 2007


nani a écrit :
> i am getting the following error for below code
> 
(snip)
>  C:\Program Files\Apache Group\Apache2\cgi-bin\hello.py in ()
>     7
>     8 val = cgi.FieldStorage()
>     9 name = val["name"].value
(snip)
> 
> <type 'exceptions.KeyError'>: 'name'

Obviously there's no 'name' argument in the http request. Remember that 
html forms dont return key/value pairs for empty (not selected / 
whatever) fields.



More information about the Python-list mailing list