CGI & Python (error)
colinmeeks at home.com
Fri Mar 2 14:35:17 CET 2001
> When accessing the script I get the error:
> File "getdate2.py", line 12, in ?
> File "/usr/lib/python1.5/cgi.py", line 907, in __getitem__
> raise KeyError, key
> KeyError: day
> The script works from the command line.
> My problems is: the script I am trying to run is based on another one.
> This other script works. I can't figure out the what is causing the
> as the 2 scripts are identical in every aspect execpt for 1 variable.
> scripts are run in a page which has all the required parameters passed to
> Help. Please...
If this is what I think it is (sorry it's not immediately clear), but when I
to parse anything from CGI, if nothing is entered in one of the boxes, this
seems to be especially for radio buttons, then the variable isn't
The thing I always do is something like
day=1 #or what ever you want the day variable initialised as
I hope this is of some help.
More information about the Python-list