python operation neo4j error: AttributeError: 'NoneType' object has no attribute 'get_dictionary'

wrong description:

I got this error while reading data from neo4j. The database has data, but it has never been read. Both the relationship and the end node are none

But the actual database has data:

The relationship in this is the relationship type in the database, and the name is the relationship name.

It is best to change the way of fetching data and get the following data

from py2neo import Graph, Node, Relationship
neo_graph = Graph("http://127.0.0.1:7474/browser/", username="neo4j", password="ddd")
find_rela = neo_graph.run("MATCH (na:my_entity{name:'吉利远景'})-[re1:relationship{name:'最高时速'}]->(nb:my_entity)  "
                          "return na,re1,nb")
for i in find_rela:
    print(i)

 

The reference is the method in this article https://blog.csdn.net/qq_38486203/article/details/79826028 .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324356267&siteId=291194637