django python manage.py runserver异常

时间:2016-10-06 13:15:49

标签: python django

我创建了一个django项目并尝试运行我遇到异常的服务器。

(venv) root@61-cpp-release # python manage.py runserver


Performing system checks...

System check identified no issues (0 silenced).
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7fd859357f28>
Traceback (most recent call last):
  File "/root/venv/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/root/venv/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 124, in inner_run
    self.check_migrations()
  File "/root/venv/lib/python3.5/site-packages/django/core/management/base.py", line 437, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "/root/venv/lib/python3.5/site-packages/django/db/migrations/executor.py", line 20, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/root/venv/lib/python3.5/site-packages/django/db/migrations/loader.py", line 52, in __init__
    self.build_graph()
  File "/root/venv/lib/python3.5/site-packages/django/db/migrations/loader.py", line 203, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/root/venv/lib/python3.5/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
    self.ensure_schema()
  File "/root/venv/lib/python3.5/site-packages/django/db/migrations/recorder.py", line 56, in ensure_schema
    with self.connection.schema_editor() as editor:
  File "/root/venv/lib/python3.5/site-packages/django/db/backends/sqlite3/schema.py", line 25, in __enter__
    self._initial_pragma_fk = c.fetchone()[0]
TypeError: 'NoneType' object is not subscriptable

请帮我找个解决方案......

0 个答案:

没有答案