我尝试使用说明here使用django设置cassandra。
一切正常。迁移时,表格即被创建。但是当我使用python manage.py runserver
运行服务器时,它会给我以下错误:
System check identified no issues (0 silenced).
Unhandled exception in thread started by Traceback (most recent call last):
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/utils/autoreload.py",
line 228, in wrapper fn(*args, **kwargs)
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/core/management/commands/runserver.py",
line 128, in inner_run self.check_migrations()
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/core/management/base.py",
line 422, in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/db/migrations/executor.py",
line 20, in init self.loader = MigrationLoader(self.connection)
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 52, in init self.build_graph()
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/db/migrations/loader.py",
line 209, in build_graph self.applied_migrations = recorder.applied_migrations()
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/db/migrations/recorder.py",
line 65, in applied_migrations self.ensure_schema()
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django/db/migrations/recorder.py",
line 57, in ensure_schema editor.create_model(self.Migration)
File "/Users/gpallav/Env/tp/lib/python2.7/site-packages/django_cassandra_engine/base/schema.py",
line 23, in create_model raise Exception('No schema for cassandra database')
Plz帮助!
答案 0 :(得分:0)
这是django-cassandra-engine(1.2.1)的错误。
现在它已在django-cassandra-engine(1.2.2)中修复。
你可以升级你的django-cassandra-engine:
pip install --upgrage django-cassandra-engine