Passing paramters to query

beginner with ne4j from Python win 10 64 latest neo

from neo4j import *

uri = "bolt://localhost:7687"
d = GraphDatabase.driver(uri, auth=("neo4j", ""))

def do(cypher):
with d.session() as session:, name='aaa')

def add_person(d, name):
with d.session() as session:"CREATE (a:Person {name: $name}), name=name")


this simple example gives this error

neobolt.exceptions.ClientError: Expected parameter(s): name

but it works if I dont pass a param but just code the name directly


there is some detail here I cannot find in the documentation
seems pretty simple


For one you don't have the quotes in the right place. You have:"CREATE (a:Person {name: $name}), name=name")

when it should be:"CREATE (a:Person {name: $name})", name=name)