'Node' object has no attribute 'properties'
wjli-debug opened this issue · 1 comments
wjli-debug commented
Why am I using pytho to manipulate the neo4j database schema and can't get the properties
Traceback (most recent call last):
File "try.py", line 47, in <module>
main()
File "try.py", line 43, in main
data_list = fetch_nodes_and_relations(driver)
File "try.py", line 23, in fetch_nodes_and_relations
'properties': record['n'].properties
AttributeError: 'Node' object has no attribute 'properties'
robsdedude commented
For support I generally refer to either of
- Neo4j Online Community: https://community.neo4j.com/
- StackOverflow: https://stackoverflow.com/questions/tagged/neo4j+python
- Discord: https://discord.gg/neo4j
- Neo4j Support Portal if you are an enterprise customer:
https://support.neo4j.com/
I think the online community would be the best place for this.
I'd like to share some thoughts anyway: I'm wondering what made you believe that Node
objects of the Python driver should have a properties
attribute/property. If you check the API docs, you'll see that the node itself is similar to a dict
. Assuming node =
record["n"]and
nodeactually being a
Node, you can just access a given property like this
node["someProperty"], or iterate over all key-property-pairs with
node.items()`.