django 常見錯誤匯總
阿新 • • 發佈:2018-01-28
d+ body ans src strong version 都是 you notepad
File "D:\python\django\mysite\mysite\view.py", line 7 SyntaxError: (unicode error) ‘utf-8‘ codec can‘t decode byte 0xa3 in position 0: invalid start byte
1、SyntaxError: (unicode error) ‘utf-8‘ codec can‘t decode byte 0xa3 in position 0:
invalid start byte
可能原因:1、編輯器的編碼格式有問題,比如notepad++,右下角可以看到編碼格式
我的就是ANSI,但是python默認都是utf-8的,所以可以‘格式’-‘以utf-8格式編碼’即可
2、 You have 14 unapplied migration(s). Your project may not work properly until you
apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run ‘python manage.py migrate‘ to apply them.
January 28, 2018 - 11:51:04
Django version 2.0.1, using settings ‘mysite.settings‘
Starting development server at http://0.0.0.0:8001/
Quit the server with CTRL-BREAK.
好吧,運行python manage.py migrate 搞定
django 常見錯誤匯總