JoneXiong / PyRedisAdmin

A web GUI for Redis data management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] Unhandled exception http://localhost:8085/view?s=0&db=0&key=t2b10ywgzrf5dlnk5shbboei_Data

koaqiu opened this issue · comments

commented

查看数据的时候报错
这个数据是 ASP.Net的session数据 “Microsoft.Web.Redis.RedisSessionStateProvider”自动添加的

出错代码

UnicodeDecodeError('utf8', '\n    <h2>t2b10ywgzrf5dlnk5shbboei_Data\n     onclick="add(this.href,\'hash\');return false;" class="add">Add another value</a>\n    </p>', 1415, 1416, 'invalid start byte')

Traceback (most recent call last):
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\mole\mole.py", line 243, in handle
    return handler(**args)
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\mole\mole.py", line 181, in wrapper
    response.output = func(*a, **ka)
  File "routes.py", line 90, in view
    return template('view', out_html=out_html, media_prefix=media_prefix)
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\mole\template.py", line 357, in template
    return const.TEMPLATES[tpl].render(kwargs)
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\mole\template.py", line 332, in render
    self.execute(stdout, kwargs)
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\mole\template.py", line 319, in execute
    eval(self.co, env)
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\templates\view.html", line 76, in <module>
    {{! out_html }}
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\mole\template.py", line 204, in <lambda>
    self._str = lambda x: utils.touni(x, enc)
  File "C:\Users\\Documents\GitHub\PyRedisAdmin\mole\utils.py", line 31, in touni
    return x if isinstance(x, unicode) else unicode(str(x), encoding=enc)
  File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 1415: invalid start byte

我也报了个错:
ops! Error 500: Internal Server Error

Sorry, the requested URL http://xxx.xxx.xxx.xxx:8085/view?s=0&db=1&key=Sms:I:108 caused an error:

Unhandled exception
Exception:

UnicodeDecodeError('utf8', '\n

Sms:I:108\n [R]\n [X]\n [E]\n

\n \n \n \n \n \n
Type:
string
TTL:
[E]
Encoding:
raw
Size:
281
\n \n \n
\x00\x01\x1enet.biaobaiqiang.sms.model.Sms\x80\x00\x10\x00\x00\x0f\n\xfc\x08senderid\xf7\x80\x04\x05\xfc\x05smsid\xf7l\xfc\x06sendid\xfc\x192015081418132975176750508\xfc\x04code\xf7\x00\xfc\x0ereceivermobile\xfc\x0b15852769728\xfc\x03use\xfc\x07sayLove\xfc\x07addtime\x00\x01\x12java.sql.Timestamp7\x82\x109\xb3+O\x01\x00\x00B\x00\x00\xfc\x06postid\xf7\x81\x9b\x8d\x00\x00\xfc\x05state\xfc\x105098237895976002\xfc\x07content\xfc\x0c\xffhT\xff\x89\x8f,\xff\x11b\xff\xf3\xff\xf9[\xffO\xff\xf4\x8b:\xff\x11b\xff1r\xffO\xff\xfc\x03Sms\x00</div></td><td><div>\n <a href="/edit?s=0&db=1&amp;type=string&amp;key=Sms:I:108" onclick="edit(this.href,\'\x00\x01\x1enet.biaobaiqiang.sms.model.Sms\x80\x00\x10\x00\x00\x0f\n\xfc\x08senderid\xf7\x80\x04\x05\xfc\x05smsid\xf7l\xfc\x06sendid\xfc\x192015081418132975176750508\xfc\x04code\xf7\x00\xfc\x0ereceivermobile\xfc\x0b15852769728\xfc\x03use\xfc\x07sayLove\xfc\x07addtime\x00\x01\x12java.sql.Timestamp7\x82\x109\xb3+O\x01\x00\x00B\x00\x00\xfc\x06postid\xf7\x81\x9b\x8d\x00\x00\xfc\x05state\xfc\x105098237895976002\xfc\x07content\xfc\x0c\xffhT\xff\x89\x8f,\xff\x11b\xff\xf3\xff\xf9[\xffO\xff\xf4\x8b:\xff\x11b\xff1r\xffO\xff\xfc\x03Sms\x00');return false;">[E]\n
\n ', 1141, 1142, 'invalid start byte')
Traceback:

Traceback (most recent call last):
File "/download/PyRedisAdmin/mole/mole.py", line 243, in handle
return handler(*_args)
File "/download/PyRedisAdmin/mole/mole.py", line 181, in wrapper
response.output = func(_a, **ka)
File "routes.py", line 90, in view
return template('view', out_html=out_html, media_prefix=media_prefix)
File "/download/PyRedisAdmin/mole/template.py", line 357, in template
return const.TEMPLATES[tpl].render(kwargs)
File "/download/PyRedisAdmin/mole/template.py", line 332, in render
self.execute(stdout, kwargs)
File "/download/PyRedisAdmin/mole/template.py", line 319, in execute
eval(self.co, env)
File "/download/PyRedisAdmin/templatesiew.html", line 76, in
{{! out_html }}
File "/download/PyRedisAdmin/mole/template.py", line 204, in
self._str = lambda x: utils.touni(x, enc)
File "/download/PyRedisAdmin/mole/utils.py", line 31, in touni
return x if isinstance(x, unicode) else unicode(str(x), encoding=enc)
File "/usrb64/python2.6/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 1141: invalid start byte

同报这个错误了

问题已修复