【发布时间】:2015-06-02 22:30:57
【问题描述】:
当我使用 PyNeo 2.0.7 和 Neo4J 2.2.1 在 Python 3.4 中运行时,我收到了这个错误 TypeError: 'str' object is not callable 但根据此处的 PyNeo 文档 (http://py2neo.org/2.0/cypher.html) 似乎是正确的
from py2neo import authenticate,Graph
authenticate("localhost:7474", "XXXX", "XXXX")
graph = Graph("http://localhost:7474/db/data")
query = "MATCH (n) RETURN n LIMIT 10"
result = graph.cypher.execute(query)
【问题讨论】:
-
你在哪一行得到错误?
-
第 5 行:它告诉我不能使用对象 str 作为执行的参数
标签: python-3.x neo4j py2neo