我按照入门settings.py
中的指示进行了这些设置:
NEOMODEL_NEO4J_BOLT_URL = os.environ.get('NEO4J_BOLT_URL', 'bolt://neo4j:password@localhost:7687')
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_neomodel',
'utils'
]
但我只得到这个错误python manage.py install_labels
:
neo4j.exceptions.ServiceUnavailable: [SSLCertVerificationError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 1: Operation not permitted)
我知道数据库和 neomodel 都可以,因为neomodel_install_labels models.py --db bolt://neo4j:password@localhost:7687
可以完美运行并在数据库上创建节点。
我不知道在哪里可以找到这个异常的来源。