Search code examples
pythonneo4jpy2neo

py2neo Can't run GraphServer


I've problems using the server from the py2neo package.

Here is what I try:

from py2neo.server import GraphServer
server = GraphServer()

This leads to the following exception:

FileNotFoundError: [Errno 2] No such file or directory: '.\\conf\\neo4j-server.properties'

So I looked up the installation:

server = GraphServer("C:\Program Files (x86)\\Neo4j Community\\bin")

where I get the same Exception:

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Neo4j Community\\bin\\conf\\neo4j-server.properties'

I looked where the neo4j-server.properties is. It's in C:/Users/Me/AppData/Roaming/Neo4j_Community/ but if I use that, it's not working either...

py2neo version: 2.0.7. neo4j version 2.2.1 Python 3.4 Windows 10.

I figure there must be something wrong with the path, but I didn't found anything to fix that.

What I'm trying to achieve: I want a function that shuts down the server if it is running and start a new process with a database that I use only for testing (and end the server and restart the old Graph after running the tests). Until now I do that manualy...

Thanks a lot


Solution

  • As mentioned on the server page in the docs, this module is built on Linux and will likely only work there. I don't support this functionality under Windows.

    http://py2neo.org/2.0/server.html