QUERY_STRING error

Fredrik Lundh fredrik at effbot.org
Sun Oct 29 08:37:44 EST 2000


Joonas wrote:
> I got error seen below.
>
> <snip>
>
> Traceback (innermost last):
>   File "./viestit.cgi", line 5, in ?
>     komento = environ["QUERY_STRING"]
>   File "/opt/python/lib/python1.5/UserDict.py", line 12, in __getitem__
>     def __getitem__(self, key): return self.data[key]
> KeyError: QUERY_STRING
>
> </snip>

why not read the fine manual?

library reference -> index -> k -> keyerror:

    KeyError
    raised when a mapping (dictionary) key is not
    found in the set of existing keys

in other words, Python's telling you that there are no
QUERY_STRING in your environment.

</F>





More information about the Python-list mailing list