【问题标题】:Error running cypher query with Python 3.4使用 Python 3.4 运行密码查询时出错
【发布时间】: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


【解决方案1】:

我解决了这个问题,只是重新启动了 neo4j 服务器,这让我无法理解发生了什么,但现在它可以工作了。

【讨论】:

    猜你喜欢
    • 2022-07-18
    • 2015-03-06
    • 1970-01-01
    • 2015-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-11
    • 1970-01-01
    相关资源
    最近更新 更多