Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-08-2020 06:22 AM
I have a Neo4j VM Enterprise created in Azure.
I tried to run a pipeline in Azure Devops, this pipeline only contains a python file to insert data into this VM.
I launched the pipeline but I have the following error:
neo4j.exceptions.ClientError: {code: Neo.ClientError.Statement.AccessMode} {message: Writing in read access mode not allowed. Attempted write to internal graph 0 (neo4j)}
Here is my python code:
from neo4j import GraphDatabase
import pandas as pd
uri = "bolt://20.43.62.37:7687"
userName = "neo4j"
password = "**********"
driver = GraphDatabase.driver(uri, auth=(userName,password))
session = driver.session()
def create_node(tx):
tx.run("CREATE (c:Article) RETURN c")
session.read_transaction(create_node)
What can I do to insert data to this VM ? I don't know where I'm wrong
Solved! Go to Solution.
10-08-2020 07:04 AM
Hi
Have you tried :
session.write_transaction(create_node) ?
The transaction function overrides the default access mode.
Regards
Jonathan
10-08-2020 07:04 AM
Hi
Have you tried :
session.write_transaction(create_node) ?
The transaction function overrides the default access mode.
Regards
Jonathan
10-08-2020 07:07 AM
Hello @jonathansholmes, I just tried it and it works. Thank you very much
10-08-2020 07:13 AM
You are welcome. Glad it worked out. Be well.
All the sessions of the conference are now available online