#!/usr/bin/python3
# coding=utf-8

import cgitb; cgitb.enable()
import cgi, re, os, sys, socket, time, datetime, locale, codecs, random, 
smtplib, subprocess, pymysql, geoip2.database
from datetime import datetime, timedelta
from http import cookies
===================

[root@nexus cgi-bin]# /usr/bin/python3 
Python 3.3.2 (default, Aug 14 2014, 14:25:52) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
=============================

[root@nexus cgi-bin]# /usr/bin/python3 ./metrites.py 
Error in sys.excepthook:
ValueError: underlying buffer has been detached

Original exception was:
Traceback (most recent call last):
  File "/opt/rh/python33/root/usr/lib64/python3.3/os.py", line 673, in 
__getitem__
    value = self._data[self.encodekey(key)]
KeyError: b'HTTP_USER_AGENT'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./metrites.py", line 22, in <module>
    userinfo = os.environ['HTTP_USER_AGENT']
  File "/opt/rh/python33/root/usr/lib64/python3.3/os.py", line 676, in 
__getitem__
    raise KeyError(key)
KeyError: 'HTTP_USER_AGENT'
[root@nexus cgi-bin]# 
=======================================

everything is they should but still iam gettign that weird cgi:err error
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to