问题:ValueError: The following settings are not supported: {‘http_port’: 7474}
原因:
由于py2neo版本过高,但是下面这个代码块的代码是之前旧版本的书写方式,因此若是安装了高版本的py2neo则需要使用新的书写语法,例如需要改成:self.g = Graph("http://localhost:7474", auth=("neo4j", "neo4j"))
self.g = Graph(
host="127.0.0.1",
http_port=7474,
user="neo4j",
password="neo4j")
解决方法:
需要将以上代码块改成:self.g = Graph("http://localhost:7474", auth=("neo4j", "neo4j"))
原来是我另一个文件中的self.g = Graph(“http://localhost:7474”, auth=(“neo4j”, “neo4j”))没改过来,仍然用的之前的方法,要将注释掉的那部分改为圈起来的这部分才行!!!
可以成功运行啦!