I'm trying the following:
from py2neo import Graph, Node
graph = Graph() #1
alice = Node("Person", name="Alice")
graph.create(alice)
I get the following error when I turn authentication off
Traceback (most recent call last):
File "", line 1, in
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 706, in create
statement = CreateStatement(self)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/cypher/create.py", line 44, in init
self.supports_node_labels = self.graph.supports_node_labels
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 1080, in supports_node_labels
return self.neo4j_version >= (2, 0)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 958, in neo4j_version
return version_tuple(self.resource.metadata["neo4j_version"])
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 213, in metadata
self.get()
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 267, in get
raise_from(self.error_class(message, **content), error)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/util.py", line 235, in raise_from
raise exception
py2neo.error.GraphError: HTTP GET returned response 404
At 1 if I do the following
graph = Graph("http://neo4j:mypwd@127.0.0.1:7474/db/data")
I get the following error:
Traceback (most recent call last):
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 258, in get
response = self.__base.get(headers=headers, redirect_limit=redirect_limit, **kwargs)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/packages/httpstream/http.py", line 966, in get
return self.__get_or_head("GET", if_modified_since, headers, redirect_limit, **kwargs)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/packages/httpstream/http.py", line 943, in __get_or_head
return rq.submit(redirect_limit=redirect_limit, **kwargs)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/packages/httpstream/http.py", line 452, in submit
return Response.wrap(http, uri, self, rs, **response_kwargs)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/packages/httpstream/http.py", line 489, in wrap
raise inst
py2neo.packages.httpstream.http.ClientError: 404 Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 706, in create
statement = CreateStatement(self)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/cypher/create.py", line 44, in init
self.supports_node_labels = self.graph.supports_node_labels
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 1080, in supports_node_labels
return self.neo4j_version >= (2, 0)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 958, in neo4j_version
return version_tuple(self.resource.metadata["neo4j_version"])
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 213, in metadata
self.get()
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/core.py", line 267, in get
raise_from(self.error_class(message, **content), error)
File "/Users/johnnyv/Library/Python/3.7/lib/python/site-packages/py2neo/util.py", line 235, in raise_from
raise exception
py2neo.error.GraphError: HTTP GET returned response 404
Can you help?