Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-07-2020 03:44 PM
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?
05-08-2020 05:56 AM
Which Neo4j version and which py2neo version you're on?
05-10-2020 06:03 PM
Thanks
neo4j is 1.7.2
py2neo is 2.0.8
05-11-2020 12:31 AM
I really doubt you're on Neo4j 1.7.2 - that version is ~8 years old.
05-11-2020 05:14 AM
I executed the command pip list. Here are the entries
py2neo 2.0.8
neo4j 1.7.2
Ideas?
05-11-2020 05:23 AM
I did ask about the Neo4j version you're using, not the version of the driver.
05-11-2020 05:26 AM
If you mean Neo4j desktop, it's 1.2.7.
If that's not correct, let me know how to provide the info you need.
05-11-2020 05:27 AM
So inside Neo4j you can run multiple databases, each can have it's own version. So what Neo4j version you're using?
05-11-2020 05:29 AM
Can you help me to get the information you need? Is there a command I can run, or series of actions/click to get you the information?
05-11-2020 06:13 AM
call dbms.components()
05-11-2020 06:22 AM
"Neo4j Kernel" ["4.0.3"] "community"
05-11-2020 06:30 AM
Your py2neo version doesn't work with Neo4j 4.0 since the HTTP endpoints have changed.
There's a pre-release available, see https://py2neo.org/v5/. To install it: pip install py2neo==5.0b1
05-11-2020 09:38 AM
That works! Thanks for your help and time.
All the sessions of the conference are now available online