写一个简单的页面,前台访问返回
UnicodeDecodeError at /
'utf8' codec can't decode byte 0xd7 in position 132: invalid continuation byte
| Request Method: | GET |
|---|---|
| Request URL: | http://127.0.0.1:8000/ |
| Django Version: | 1.8.16 |
| Exception Type: | UnicodeDecodeError |
| Exception Value: |
'utf8' codec can't decode byte 0xd7 in position 132: invalid continuation byte |
| Exception Location: | D:\Program Files\Python\Python27\lib\codecs.py in decode, line 314 |
| Python Executable: | D:\Program Files\Python\Python27\python.exe |
| Python Version: | 2.7.13 |
| Python Path: |
['D:\\Program Files\\Python\\project\\django\\djTest', 'D:\\Program Files\\Python\\Python27\\python27.zip', 'D:\\Program Files\\Python\\Python27\\DLLs', 'D:\\Program Files\\Python\\Python27\\lib', 'D:\\Program Files\\Python\\Python27\\lib\\plat-win', 'D:\\Program Files\\Python\\Python27\\lib\\lib-tk', 'D:\\Program Files\\Python\\Python27', 'D:\\Program Files\\Python\\Python27\\lib\\site-packages', 'D:\\Program Files\\Python\\Python27\\lib\\site-packages\\dbutils-1.1-py2.7.egg', 'D:\\Program Files\\Python\\Python27\\lib\\site-packages\\pymysql-0.7.9-py2.7.egg'] |
| Server time: | Fri, 24 Feb 2017 11:57:03 +0800 |
我使用的UE编辑器,讲对应页面文件home.html编码格改为utf-8后正常显示
本文记录了一次使用Django框架开发网页过程中遇到的UnicodeDecodeError错误,详细描述了错误发生的情境及解决方法,即通过将UE编辑器中home.html文件的编码格式从默认设置更改为utf-8来解决。
572

被折叠的 条评论
为什么被折叠?



