Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-21-2019 05:07 PM
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:
session.run(cypher, name='aaa')
def add_person(d, name):
with d.session() as session:
session.run("CREATE (a:Person {name: $name}), name=name")
add_person(d,"bob")
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
name='bob'
there is some detail here I cannot find in the documentation
seems pretty simple
thanks
09-22-2019 08:02 PM
For one you don't have the quotes in the right place. You have:
session.run("CREATE (a:Person {name: $name}), name=name")
when it should be:
session.run("CREATE (a:Person {name: $name})", name=name)
All the sessions of the conference are now available online