<type 'exceptions.UnicodeDecodeError'>
Python 2.5.1: C:\Python25\python.exe
Tue Feb 07 12:09:58 2012

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 e:\nginx-1.0.0\nginx-1.0.0\build\bdist.win32\egg\flup\server\fcgi_base.py in run(self=<flup.server.fcgi_base.Request object at 0x00D59730>)
  556         """Runs the handler, flushes the streams, and ends the request."""
  557         try:
  558             protocolStatus, appStatus = self.server.handler(self)
  559         except:
  560             traceback.print_exc(file=self.stderr)
 e:\nginx-1.0.0\nginx-1.0.0\build\bdist.win32\egg\flup\server\fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object at 0x00B0A850>, req=<flup.server.fcgi_base.Request object at 0x00D59730>)
 1116         try:
 1117             try:
 1118                 result = self.application(environ, start_response)
 1119                 try:
 1120                     for data in result:
 C:\Python25\lib\site-packages\web\application.py in wsgi(env={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'DOCUMENT_ROOT': 'F:/python/training/root', 'DOCUMENT_URI': '/\xe7\x81\xaf\xe7\xac\xbc-\xe6\xb2\xb3\xe5\x8c\x97\xe7\x9c\x81\xe8\x97\x81\xe5\x9f\x8e\xe5\xb8\x82\xe4\xbc\x9a\xe5\xbc\xba\xe7\x81\xaf\xe7\xac\xbc\xe5\x8e\x82', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', ...}, start_resp=<function start_response at 0x072B67B0>)
  274             self._cleanup()
  275 
  276             self.load(env)
  277             try:
  278                 # allow uppercase methods only
self = <web.application.application instance at 0x00B055D0>, self.load = <bound method application.load of <web.application.application instance at 0x00B055D0>>, env = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'DOCUMENT_ROOT': 'F:/python/training/root', 'DOCUMENT_URI': '/\xe7\x81\xaf\xe7\xac\xbc-\xe6\xb2\xb3\xe5\x8c\x97\xe7\x9c\x81\xe8\x97\x81\xe5\x9f\x8e\xe5\xb8\x82\xe4\xbc\x9a\xe5\xbc\xba\xe7\x81\xaf\xe7\xac\xbc\xe5\x8e\x82', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', ...}
 C:\Python25\lib\site-packages\web\application.py in load(self=<web.application.application instance at 0x00B055D0>, env={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'DOCUMENT_ROOT': 'F:/python/training/root', 'DOCUMENT_URI': '/\xe7\x81\xaf\xe7\xac\xbc-\xe6\xb2\xb3\xe5\x8c\x97\xe7\x9c\x81\xe8\x97\x81\xe5\x9f\x8e\xe5\xb8\x82\xe4\xbc\x9a\xe5\xbc\xba\xe7\x81\xaf\xe7\xac\xbc\xe5\x8e\x82', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', ...})
  374             if isinstance(v, str):
  375                 #ctx[k] = safeunicode(v)
  376                 ctx[k] = safeunicode(v,'gb2312') #zhangsp
  377 
  378         # status must always be str
ctx = <Storage {'status': u'200 OK', 'realhome': 'http...7%AC%BC%E5%8E%82', 'query': '', 'method': 'GET'}>, k = 'realhome', global safeunicode = <function safeunicode at 0x009290F0>, v = 'http://www.denglong.net/\xe7\x81\xaf\xe7\xac\xbc-\xe6\xb2\xb3\xe5\x8c\x97\xe7\x9c\x81\xe8\x97\x81\xe5\x9f\x8e\xe5\xb8\x82\xe4\xbc\x9a\xe5\xbc\xba\xe7\x81\xaf\xe7\xac\xbc\xe5\x8e\x82'
 C:\Python25\Lib\site-packages\web\utils.py in safeunicode(obj='http://www.denglong.net/\xe7\x81\xaf\xe7\xac\xbc-\xe6\xb2\xb3\xe5\x8c\x97\xe7\x9c\x81\xe8\x97\x81\xe5\x9f\x8e\xe5\xb8\x82\xe4\xbc\x9a\xe5\xbc\xba\xe7\x81\xaf\xe7\xac\xbc\xe5\x8e\x82', encoding='gb2312')
  324         return obj
  325     elif t is str:
  326         return obj.decode(encoding)
  327     elif t in [int, float, bool]:
  328         return unicode(obj)
obj = 'http://www.denglong.net/\xe7\x81\xaf\xe7\xac\xbc-\xe6\xb2\xb3\xe5\x8c\x97\xe7\x9c\x81\xe8\x97\x81\xe5\x9f\x8e\xe5\xb8\x82\xe4\xbc\x9a\xe5\xbc\xba\xe7\x81\xaf\xe7\xac\xbc\xe5\x8e\x82', obj.decode = <built-in method decode of str object at 0x072C5288>, encoding = 'gb2312'

<type 'exceptions.UnicodeDecodeError'>: 'gb2312' codec can't decode bytes in position 24-25: illegal multibyte sequence