cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

AttributeError: 'NoneType' object has no attribute 'labels'

Hello everyone,

I want to add relations to my csv file, but I keep on meeting this error,

** 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**

I am following this tutorials. GitHub - jm199504/Financial-Knowledge-Graphs: 小型金融知识图谱构建流程
The related code is this:

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,'participant',a)
#graph.create(r)
graph.create(Relationship(j,'参股',a))
print('TS',str(i[0]))

1 REPLY 1

can anybody help me?

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online