我正面临着启动runserver django?
发布时间:2020-12-20 13:14:35 所属栏目:Python 来源:网络整理
导读:运行服务器时出现以下错误.我使用Django === 1.10.2和默认的sqlite3数据库作为后端.但我有以下例外情况: python manage.py runserverPerforming system checks...System check identified no issues (0 silenced).Unhandled exception in thread started by
运行服务器时出现以下错误.我使用Django === 1.10.2和默认的sqlite3数据库作为后端.但我有以下例外情况:
python manage.py runserver Performing system checks... System check identified no issues (0 silenced). Unhandled exception in thread started by <function wrapper at 0x7f56983c3140> Traceback (most recent call last): File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/utils/autoreload.py",line 226,in wrapper fn(*args,**kwargs) File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py",line 124,in inner_run self.check_migrations() File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/core/management/base.py",line 437,in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/executor.py",line 20,in __init__ self.loader = MigrationLoader(self.connection) File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/loader.py",line 52,in __init__ self.build_graph() File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/loader.py",line 203,in build_graph self.applied_migrations = recorder.applied_migrations() File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/recorder.py",line 65,in applied_migrations self.ensure_schema() File "/home/nidhinjames/popo/popo/mysite/venv/lib/python2.7/site-packages/django/db/migrations/recorder.py",line 59,in ensure_schema raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc) UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 6: ordinal not in range(128) 任何解决方案都可以欣赏???? 解决方法
您似乎在某处设置了一个奇怪的字符,很可能是在django设置中指定的sqlite文件的名称.
Django试图提升MigrationSchemaMissing(“无法创建django_migrations表(%s)”%exc) – 当这样做时遇到UNICODE错误,该错误告诉0xf1不是ASCII的一部分.基于this table,这是字符±.由于django肯定不会将其用作表名,我猜它必须与文件名相关. 如果不是这种情况,请尝试grep’±’.在项目文件夹中找到此角色的用法. HTH (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |