[Tutor] Error in cgi script having health effects on blood presure readings

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Mon, 19 Aug 2002 00:44:57 -0700 (PDT)


> Traceback (innermost last):
>   File "/www/www.tinylist.org/cgi-bin/TLmemberlister.py", line 125, in ?
>     mylist = form.getvalue("listname","")               # listname,
>   File "/usr/local/lib/python1.5/cgi.py", line 888, in __getattr__
>     raise AttributeError, name
> AttributeError: getvalue

Hi Kirk,

Ah!  the getvalue() method was only recently added in Python 2.2 as part
of the "Higher Level Interface" of the 'cgi' module:

    http://www.python.org/doc/lib/node296.html

If you want to stick with Python 1.52, you might be able to use this:

    mylist = form['listname'].value

... although this isn't quite equivalent.  Is it possible to upgrade to
Python 2.2?


Hope this helps!