I have tried to connect to neo4j from python 3, but I always come across this error:
---------------------------------------------------------------------------
AuthError Traceback (most recent call last)
<ipython-input-20-e407bdc814a1> in <module>
----> 1 graph.create(cloves)
~/.local/lib/python3.6/site-packages/py2neo/database.py in create(self, subgraph)
353 :class:`.Subgraph`
354 """
--> 355 with self.begin() as tx:
356 tx.create(subgraph)
357
~/.local/lib/python3.6/site-packages/neobolt/direct.py in on_failure(self, metadata)
755 message = metadata.get("message", "Connection initialisation failed")
756 if code == "Neo.ClientError.Security.Unauthorized":
--> 757 raise AuthError(message)
758 else:
759 raise ServiceUnavailable(message)
AuthError: The client is unauthorized due to authentication failure.
My code is:
from py2neo import Graph
from py2neo import Node, Relationship
graph = Graph("bolt://localhost:7687", user="neo4j", password="neo4j")
cloves = Node('Person', name='Cloves', born='1989')
graph.create(cloves)
I checked the user I have registered on neo4j by default.
I've tried some approaches like create an architect role. Even so, when I declare the user, I get the same error.
I solved the problem, it is necessary to reset the default user password neo4j as it is informed here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With