I'm using py2neo to insert some data into my neo4j db.

I create arrays of NodePointers and Relations and insert them with

for i in rels:
    test_graph.create(i)

after the process.

During the creation of my arrays I would like to check if a specific 
NodePointer was already added to the array or not (don't want to create two 
NodePointers with same name). 

Looking for a way to check a NodePointer properties, I've found this at 
py2neo documentation: 

    
>>> alice.properties["name"]
    'Alice'


but when I try to do: 

    
def isThereAThisInHere(this, here):
    for i in here:
        if (i.properties["name"] == this):
        return i
    return False 


mVar = isThereAThisInHere(defWord.wordVar[0],tempVar)
if (mVar == False):
    mVar = Node("Variable",name=defWord.wordVar[0])
tempVar.append(mVar) 


I get: 
'NodePointer' object has no attribute 'labels'

Does anyone have a solution or suggestion for my problem? Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to