首页 > 其他 > 详细

django 常见错误汇总

时间:2018-01-28 13:35:22      阅读:415      评论:0      收藏:0      [点我收藏+]
 File "D:\python\django\mysite\mysite\view.py", line 7
SyntaxError: (unicode error) utf-8 codec cant 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 常见错误汇总

原文:https://www.cnblogs.com/duole/p/8370902.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!