Failed creating nodes to neo4j aura
ppalka-lingaro opened this issue · 1 comments
Expected Behavior (Mandatory)
Connect to neo4j aura and creation of nodes and relationship using neomodel
not get any error
config.DATABASE_URL = 'neo4j+s://{}:{}@{}'.format(user, password, uri)
neo4j+s://neo4j:password@aura_instance.databases.neo4j.io:7687
Actual Behavior (Mandatory)
writing or connection failed
ERROR:
after 1st execution
Failed to write data to connection ResolvedIPv4Address(('XX.XX.XX.XX', 7687)) (ResolvedIPv4Address(('XX.XX.XX.XX', 7687)))
Failed to write data to connection IPv4Address(('aura_instance.databases.neo4j.io', 7687)) (ResolvedIPv4Address(('XX.XX.XX.XX', 7687)))
after second execution, looks that nodes where created but why after 1st time it's failing with this error
neomodel.exceptions.UniqueProperty: Node(1381) already exists with label Person
and property name
= 'John'
How to Reproduce the Problem
- create aura instance on neo4j page
- connect using neomodel
Simple Example
class Person(StructuredNode):
name = StringProperty(unique_index=True)
knows = RelationshipTo('Person', 'KNOWS')
john = Person(name='John').save()
jane = Person(name='Jane').save()
Create a relationship
john.knows.connect(jane)
Datasets and Statements
I tested connection using
cypher-shell -a neo4j+s://aura_instance.databases.neo4j.io -u neo4j -p password
Connected to Neo4j using Bolt protocol version 5.3 at neo4j+s://aura_instance.databases.neo4j.io:7687 as user neo4j.
also before was using native neo4j driver and all was working
Screenshots (where it's possible)
Specifications (Mandatory)
Currently used versions
Versions
- OS: Windows 11
- Library: neomodel 5.2
- Neo4j:5.12 # tried 5.14 but didn't work with python 3.12 and neomodel
- python 3.10.11 - I # tried initially on 3.12 but it was causing issues with installation.
Hello,
From your message, I get you did manage to connect to Aura using neomodel, right ? It's writing the node that is causing issues.
Also, we do test connection to Aura in our integrations test, with all four available protocols, and all supported Python versions 3.7 -> 3.11 (note we do not support Python 3.12 yet)
Just in case, can you add this in your code, before trying to connect ?
from neo4j.debug import watch
with watch("neo4j"):
# Connect and query
This should output more information about the driver status