Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py2neo compatibility #5

Open
pcexhaust opened this issue Dec 16, 2016 · 1 comment
Open

py2neo compatibility #5

pcexhaust opened this issue Dec 16, 2016 · 1 comment

Comments

@pcexhaust
Copy link

I understand this might be a dead project... anyhow I think the imports and related for py2neo in neo4j_database.py no longer work because they have been deprecated. See https://neo4j.com/blog/py2neo-2-0-unleashed/ (Nov 2014)

e.g. I think
from py2neo import neo4j, node, rel

should now be
from py2neo import Graph, Node, Relationship

e.g.

Python 2.7.5 (default, Nov  6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from py2neo import neo4j, node, rel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name neo4j
>>> from py2neo import Graph, Node, Relationship
>>>

But then there are more issues like "get_or_create_index" which doesn't seem to exist anymore...

  File "/home/user/poortego-master/poortego/data_management/neo4j/neo4j_database.py", line 24, in set_database_defaults
    self.indexes.append( self.db_conn.get_or_create_index(neo4j.Node, "NameIdx") )
AttributeError: 'Graph' object has no attribute 'get_or_create_index'

Tested with py2neo 3.1.2 and neo4j community 3.1.0

@JamesClarke7283
Copy link

Thank you for this, this will make my job easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants