How to delete a node in Neo4j using py2neo?
0
Using py2neo v4 to connect to my Neo4j database and I can't delete nodes via py2neo running a query that works fine in Cypher in the browser. Of course there is no real documentation for either Neo4j or py2neo, so hopefully I can get some help here. There are similar questions, but both Neo4j and py2neo have new versions since then, and those questions/answers are either for other specific cases or are obsolete methods. First, I define this function: def deleteNode(thisNodeID): graph.run("MATCH (n) where id(n) = $nodeID DETACH DELETE n", parameters={"nodeID":thisNodeID}) Then I call the function like: badObjectIDs = [268569,268535,268534] for badID in badObjectIDs: deleteNode(badID) This runs without any trouble, but doesn't delete anything and the nodes