码迷,mamicode.com
首页 > 其他好文 > 详细

django 常见错误汇总

时间:2018-01-28 13:45:57      阅读:341      评论:0      收藏:0      [点我收藏+]

标签:version   serve   pre   evel   默认   log   UI   site   start   

 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 常见错误汇总

标签:version   serve   pre   evel   默认   log   UI   site   start   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!