迭代相关对象

时间:2018-02-15 10:18:30

标签: python python-3.x neo4j py2neo

我构建了一个代码的最小示例,我希望迭代相关对象,但它会抛出错误

Python版本:3.6.4 - 所有系统上的64位
似乎在Win10系统上工作,但在Win7系统上发生错误 有任何想法吗?

问题的最小例子:

 class solution(GraphObject):
    __primarykey__ = "name"

    name=Property()

    includes = RelatedTo("solution")

#graph got initialized as graph

#code:
var=list(solution.select(graph))#gets a list of all solutions
for x in var:#iterates over solutions
    print(x.name)
    for y in x.includes: #not working
        print("---connected to: "+y.name) #not working
  

错误:在p2neo \ packages \ neo4j \ v1 \ session.py第124行   session = self.session_pool.pop()IndexError:从空deque中弹出

发生了另一个错误:

  

ConnectionRefusedError:[WinError 10061]

这是否与py2neo或我自己设置的neo4j

有关

提前致谢 RESC

0 个答案:

没有答案