Schnittstelle Python zu Neo4j
Verfasst: Donnerstag 7. Dezember 2017, 15:10
Hallo,
ich habe die community version von Neo4j und verwende Python.
Ich habe beides installiert und auch viele module, unter anderem p2neo bereits installiert. Ich möchte die Pythonverknüpfung zu Neo4j verwenden
sowie wie es bei dem Tutorial hier :http://py2neo.org/2.0/intro.html.
Ferner habe ich auch in der Config-Datei die Einstelung #dmbs.directories.import=import verändert.
Dennoch kann ich noch nichts machen. Wenn ich zB diesen Code schreibe kommt eine Fehlermeldung:
from py2neo import Graph
graph = Graph()
Fehlermeldung:
Traceback (most recent call last):
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\__init__.py", line 318, in __new__
inst = cls.__instances[key]
KeyError: (<class 'py2neo.database.Graph'>, <ServerAddress settings={}>, 'data')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\http.py", line 154, in get
response = self.__base.get(headers=headers, redirect_limit=redirect_limit, **kwargs)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\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 "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\packages\httpstream\http.py", line 943, in __get_or_head
return rq.submit(redirect_limit=redirect_limit, **kwargs)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\packages\httpstream\http.py", line 452, in submit
return Response.wrap(http, uri, self, rs, **response_kwargs)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\packages\httpstream\http.py", line 489, in wrap
raise inst
py2neo.packages.httpstream.http.ClientError: 401 Unauthorized
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Desktop\Python_2_Neo\p2n_1.py", line 2, in <module>
graph = Graph()
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\__init__.py", line 327, in __new__
use_bolt = version_tuple(inst.__remote__.get().content["neo4j_version"]) >= (3,)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\http.py", line 157, in get
raise Unauthorized(self.uri.string)
py2neo.database.status.Unauthorized: http://localhost:7474/db/data/
Meine Frage:
Wie kann ich exakt die Schnittstelle zu Neo4j herstellen? Was mache ich falsch ?
ich habe die community version von Neo4j und verwende Python.
Ich habe beides installiert und auch viele module, unter anderem p2neo bereits installiert. Ich möchte die Pythonverknüpfung zu Neo4j verwenden
sowie wie es bei dem Tutorial hier :http://py2neo.org/2.0/intro.html.
Ferner habe ich auch in der Config-Datei die Einstelung #dmbs.directories.import=import verändert.
Dennoch kann ich noch nichts machen. Wenn ich zB diesen Code schreibe kommt eine Fehlermeldung:
from py2neo import Graph
graph = Graph()
Fehlermeldung:
Traceback (most recent call last):
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\__init__.py", line 318, in __new__
inst = cls.__instances[key]
KeyError: (<class 'py2neo.database.Graph'>, <ServerAddress settings={}>, 'data')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\http.py", line 154, in get
response = self.__base.get(headers=headers, redirect_limit=redirect_limit, **kwargs)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\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 "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\packages\httpstream\http.py", line 943, in __get_or_head
return rq.submit(redirect_limit=redirect_limit, **kwargs)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\packages\httpstream\http.py", line 452, in submit
return Response.wrap(http, uri, self, rs, **response_kwargs)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\packages\httpstream\http.py", line 489, in wrap
raise inst
py2neo.packages.httpstream.http.ClientError: 401 Unauthorized
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Desktop\Python_2_Neo\p2n_1.py", line 2, in <module>
graph = Graph()
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\__init__.py", line 327, in __new__
use_bolt = version_tuple(inst.__remote__.get().content["neo4j_version"]) >= (3,)
File "C:\Users\nounh\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py2neo\database\http.py", line 157, in get
raise Unauthorized(self.uri.string)
py2neo.database.status.Unauthorized: http://localhost:7474/db/data/
Meine Frage:
Wie kann ich exakt die Schnittstelle zu Neo4j herstellen? Was mache ich falsch ?