KeyError
Frans Englich
frans.englich at telia.com
Wed Dec 15 08:49:20 EST 2004
On Wednesday 15 December 2004 13:33, rootshell at gazeta.pl wrote:
> Hello.
> Maybe someone will help me with this KeyError:
>
> ............................
> Traceback (most recent call last):
> File "C:\Python\tabla.py", line 929, in -toplevel-
> tablesDirectory = tablesDirectoryPrefix + os.environ['REMOTE_ADDR']
> File "C:\Python23\lib\os.py", line 417, in __getitem__
> return self.data[key.upper()]
> KeyError: 'REMOTE_ADDR'
> ..........................
What trouble do you have? AFAICT, The key REMOVE_ADDR wasn't in the
dictionary, meaning that the environment variable doesn't exist.
Cheers,
Frans
More information about the Python-list
mailing list