KeyError | Python 3.5.3: /usr/bin/python3.5 Thu Dec 5 01:47:57 2024 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/usr/lib/cgi-bin/prod/cis/main.py in |
83 |
84 #if visitor comes from codeitsmartly.com then redirect him to the secured page https://codeitsmartly.com |
=> 85 if os.environ['HTTP_REFERER'] == 'http://codeitsmartly.com/': |
86 print ('<html><head>') |
87 print ('<script type="text/javascript">') |
os = <module 'os' from '/usr/lib/python3.5/os.py'>, os.environ = environ({'SSL_SERVER_V_END': 'Jun 18 23:59:59 20... 'HTTP/1.1', 'SERVER_NAME': 'codeitsmartly.com'}) |
/usr/lib/python3.5/os.py in __getitem__(self=environ({'SSL_SERVER_V_END': 'Jun 18 23:59:59 20... 'HTTP/1.1', 'SERVER_NAME': 'codeitsmartly.com'}), key='HTTP_REFERER') |
723 except KeyError: |
724 # raise KeyError with the original key value |
=> 725 raise KeyError(key) from None |
726 return self.decodevalue(value) |
727 |
builtin KeyError = <class 'KeyError'>, key = 'HTTP_REFERER' |
KeyError: 'HTTP_REFERER'
args =
('HTTP_REFERER',)
with_traceback =
<built-in method with_traceback of KeyError object>