Hi "R",

The only explanation I can give is that the environment varialbe REMOTE_ADDR
does not exist!  Wrap your high-level code with try and except. Example:
try:
 tablesDirectory = tablesDirectoryPrefix + os.environ['REMOTE_ADDR']
except KeyError:
  # Code to  handle the fact tht REMOT_ADDR does not exist. 

Hope that this helps and is not just another infamous "Dermot Didn't Get It"
posting!

Cheers!!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 15 December 2004 13:34
To: [EMAIL PROTECTED]
Subject: KeyError

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'
.......................... 


Thanks for reading this.
R.



-- 
http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to