windows下新建了一个Django项目,pycharm配置完后,运行报错:django.db.utils.OperationalError: unable to open database file
解决办法:网上说是没有权限,我windows对权限没有那么严格吧,有的说是python manage.py runserver前加sudo,我的解决方法是,迁移了下数据库,python manage.py migrate,迁移时又包了个错误,如下
问题2:django.utils.encoding.DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0xcf in position 9: invalid continuation byte. You passed in 'E:\\xcf\xee\xc4\xbf\ \celery_auto_task\\auto_celery\\db.sqlite3' (<type 'str'>)
解决办法:项目路径中,有中文的,将中文改为英文解决