Hi Lucas You should probably be using the `Node` object rather than the `NodePointer` object. The latter only exists to support a few pieces of older functionality and will not have access to properties or labels.
Nigel On 30 March 2016 at 11:45, Lucas Lourenço <lucas.cc...@gmail.com> wrote: > 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 neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.