neo4j 版本问题导致数据库无法连接

我同学的图书库是3.5.5 他用的py2是py2neo==2020.0.0

在他电脑上图数据库可以连接。

我的图数据版本如下

使用  py2neo == 2020.00  连接图数据库时,报了如下错误

Exception in thread django-main-thread:
Traceback (most recent call last):     
  File "E:\miniconda3\envs\M_F\lib\site-packages\py2neo\database\__init__.py", line 190, in __new__
    inst = cls._instances[profile]
KeyError: ConnectionProfile('http://[email protected]:7474')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\miniconda3\envs\M_F\lib\site-packages\py2neo\client\__init__.py", line 517, in acquire
    cx = self._free_list.popleft()
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\miniconda3\envs\M_F\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "E:\miniconda3\envs\M_F\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_
run
    self.check(display_num_errors=True)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\core\management\base.py", line 423, in check
    databases=databases,
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\core\checks\registry.py", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
    return check_method()
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\urls\resolvers.py", line 412, in check
    for pattern in self.url_patterns:
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\utils\functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\utils\functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "E:\miniconda3\envs\M_F\lib\site-packages\django\urls\resolvers.py", line 591, in urlconf_module
    return import_module(self.urlconf_name)
  File "E:\miniconda3\envs\M_F\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "C:\Users\13994\Desktop\frontend_medical\medical_knowledge_graph_app-master-master\med_kg\med_kg\urls.py", l
ine 24, in 
    from med_kg import ner_view
  File "C:\Users\13994\Desktop\frontend_medical\medical_knowledge_graph_app-master-master\med_kg\med_kg\ner_view.py
", line 10, in 
    from util.pre_load import classifier
  File "C:\Users\13994\Desktop\frontend_medical\medical_knowledge_graph_app-master-master\med_kg\util\pre_load.py",
 line 119, in 
    neo4jconn = init_neo4j()
  File "C:\Users\13994\Desktop\frontend_medical\medical_knowledge_graph_app-master-master\med_kg\util\pre_load.py",
 line 66, in init_neo4j
    neo4jconn.connectNeo4j()
  File "C:\Users\13994\Desktop\frontend_medical\medical_knowledge_graph_app-master-master\med_kg\Model\neo4j_models
.py", line 13, in connectNeo4j
    self.graph = Graph("http://127.0.0.1:7474", username="neo4j", password="pen")
  File "E:\miniconda3\envs\M_F\lib\site-packages\py2neo\database\__init__.py", line 377, in __new__
KeyError: 'neo4j_version'

再保证数据库的密码和用户名都正确的情况下

还是无法连接

最后换了包 Neo4j 3.5.34  要对应 py2 == 4.3.0 

Neo4j 3.5.5 可以对应py2 == 2020得

你可能感兴趣的:(neo4j,django,python)