- 论坛徽章:
- 0
|
achaoge,
我将代码修改为你说的样子,直接报错了:
DjangoUnicodeDecodeError at /model6/
'utf8' codec can't decode bytes in position 0-1: invalid data. You passed in '\xd7\xee\xd0\xc2\xb1\xa8\xb5\xc0' (<type 'str'>)
Request Method: GET
Request URL: http://localhost:8000/model6/
Exception Type: DjangoUnicodeDecodeError
Exception Value: 'utf8' codec can't decode bytes in position 0-1: invalid data. You passed in '\xd7\xee\xd0\xc2\xb1\xa8\xb5\xc0' (<type 'str'>)
Exception Location: c:\python24\Lib\site-packages\django\utils\encoding.py in force_unicode, line 60
Python Executable: c:\python24\python.exe
Python Version: 2.4.4
Python Path: ['F:\\mytest\\mytest', 'c:\\python24\\lib\\site-packages\\setuptools-0.6c3-py2.4.egg', 'c:\\python24\\lib\\site-packages\\pygments-0.8.1-py2.4.egg', 'C:\\WINDOWS\\system32\\python24.zip', 'F:\\mytest\\mytest', 'c:\\python24\\DLLs', 'c:\\python24\\lib', 'c:\\python24\\lib\\plat-win', 'c:\\python24\\lib\\lib-tk', 'c:\\python24', 'c:\\python24\\lib\\site-packages', 'c:\\python24\\lib\\site-packages\\PIL', 'c:\\python24\\lib\\site-packages\\kodos']
Unicode error hint
The string that could not be encoded/decoded was: ?1?7?1?7?1?7?1?7?1?7?1?7?1?7
... |
|