Reputation: 23
I've tried to access from a python program to the Neo4j 3.0 database but the following error is shown:
File "C:\Python27\lib\py2neo\database\http.py", line 157, in get raise Unauthorized(self.uri.string) py2neo.database.status.Unauthorized: http://localhost:7474/db/data/
There is already a post of the same topic opened, but it's in version 2.2.
My code is:
authenticate("localhost:7474", "neo4j", "neo4j")
graph_db = Graph("http://localhost:7474/db/data/")
Which is exactly the same as in version 2.2, as it is specified in http://py2neo.org/v3/database.html.
I've also tried to do it like this:
graph_db = Graph("http://localhost:7474/db/data/", user="neo4j", password="neo4j")
But I get the same result.
Does anyone know where is the problem?
Thanks in advance.
Upvotes: 1
Views: 1628
Reputation: 9369
Access the database through the web interface (http://localhost:7474/browser/), you have to set a new password at the first log in.
Then, this should work:
from py2neo
g = Graph('http://localhost:7474/db/data', user='neo4j', password='new_password')
Upvotes: 4