Φώντας Λαδοπρακόπουλος
2015-02-13 20:04:15 UTC
Hello,
Suddenly i started to get this error message without any chnage to my script,
just to the security of apache via cPanel by runnign EasyApache:
***@secure [~]# python3 /home/nikos/www/cgi-bin/metrites.py
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/cgitb.py", line 268, in __call__
self.handle((etype, evalue, etb))
File "/usr/local/lib/python3.4/cgitb.py", line 273, in handle
self.file.write(reset())
ValueError: underlying buffer has been detached
Original exception was:
Traceback (most recent call last):
File "/home/nikos/www/cgi-bin/metrites.py", line 20, in <module>
userinfo = os.environ['HTTP_USER_AGENT']
File "/usr/local/lib/python3.4/os.py", line 651, in __getitem__
raise KeyError(key) from None
KeyError: 'HTTP_USER_AGENT'
***@secure [~]#
Here is the original code in my script:
userinfo = os.environ['HTTP_USER_AGENT']
lastvisit = datetime.now().strftime( '%y-%m-%d %H:%M:%S' ) # MySQL datetime format
ref = os.environ.get( 'HTTP_REFERER', 'Δεν βρέθηκε Αναφορά!' ).replace( 'www.', '' )
Any ideas as to why this error is being caused and the http user afent script cannot be retrieved?
Apache's security won't let it load?
Suddenly i started to get this error message without any chnage to my script,
just to the security of apache via cPanel by runnign EasyApache:
***@secure [~]# python3 /home/nikos/www/cgi-bin/metrites.py
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/cgitb.py", line 268, in __call__
self.handle((etype, evalue, etb))
File "/usr/local/lib/python3.4/cgitb.py", line 273, in handle
self.file.write(reset())
ValueError: underlying buffer has been detached
Original exception was:
Traceback (most recent call last):
File "/home/nikos/www/cgi-bin/metrites.py", line 20, in <module>
userinfo = os.environ['HTTP_USER_AGENT']
File "/usr/local/lib/python3.4/os.py", line 651, in __getitem__
raise KeyError(key) from None
KeyError: 'HTTP_USER_AGENT'
***@secure [~]#
Here is the original code in my script:
userinfo = os.environ['HTTP_USER_AGENT']
lastvisit = datetime.now().strftime( '%y-%m-%d %H:%M:%S' ) # MySQL datetime format
ref = os.environ.get( 'HTTP_REFERER', 'Δεν βρέθηκε Αναφορά!' ).replace( 'www.', '' )
Any ideas as to why this error is being caused and the http user afent script cannot be retrieved?
Apache's security won't let it load?