[Tutor] cookie error messages

Conrad Koziol arkamir at softhome.net
Tue Nov 25 19:45:01 EST 2003

This is the error message, I think it means that id cannot be found. I
looked throught the list and found that there were 2 cookies with the
name of id. I tried it with username, and some random letters and it
returned the same error. Also anyone now of a compact version of python
for windows. Like under 100 megs. I copied one that was a couple years
old and it turned out to be like 2.5 gigs uncompressed, though i think
one of the files was corrupted. I don't have admin to install it since
its going on the school network, and I'm the only one using it. :)

The following error occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

    5 import re
    6 import insertthread
    7 import retrievecookies
    8 import cgitb
retrievecookies undefined

    7 cgitb.enable()
    9 value = os.environ['id']
   11 #print "Content-type: text/html\n"
value undefined, os = <module 'os' from '/usr/lib/python2.2/os.pyc'>,
os.environ = {'HTTP_COOKIE': 'id="((\'JCm8o0RJIu\',),)"; user...':
'', 'DOCUMENT_ROOT': '/var/www/html'}

 ? in __getitem__(self={'HTTP_COOKIE': 'id="((\'JCm8o0RJIu\',),)";
user...': '', 'DOCUMENT_ROOT': '/var/www/html'}, key='id')

KeyError: id
      __doc__ = 'Mapping key not found.'
      __getitem__ = <bound method KeyError.__getitem__ of
<exceptions.KeyError instance>>
      __init__ = <bound method KeyError.__init__ of <exceptions.KeyError
      __module__ = 'exceptions'
      __str__ = <bound method KeyError.__str__ of <exceptions.KeyError
      args = ('id',)

More information about the Tutor mailing list