Financial-Knowledge-Graphs icon indicating copy to clipboard operation
Financial-Knowledge-Graphs copied to clipboard

创建关系的时候报错AttributeError: 'NoneType' object has no attribute 'labels'

Open mf093087 opened this issue 2 years ago • 5 comments

在这一步,报错。 matcher = NodeMatcher(graph) for i in holder.values:
a = matcher.match("股票",TS代码=i[0]).first() b = matcher.match("股东",TS代码=i[0]) for j in b: r = Relationship(j,'参股',a) graph.create(r) print('TS',str(i[0]))

graph.create(Relationship(j,'参股',a)) File "E:\Anaconda3\lib\site-packages\py2neo\data.py", line 847, in init Entity.init(self, (n[0], self, n[1]), properties) File "E:\Anaconda3\lib\site-packages\py2neo\data.py", line 553, in init Walkable.init(self, iterable) File "E:\Anaconda3\lib\site-packages\py2neo\data.py", line 453, in init _ = node.labels # ensure not stale AttributeError: 'NoneType' object has no attribute 'labels'

Process finished with exit code 1

mf093087 avatar Mar 08 '22 21:03 mf093087