【发布时间】:2016-02-01 23:23:27
【问题描述】:
如何遍历取开始节点和结束节点的图上的所有关系?我试过了:
import sys
import time
import json
from py2neo import Graph, Node, authenticate, Relationship
graph =Graph()
cypher = graph.cypher
def handle_row(row):
a,b = row
... do some stuff with a,b
cypher.execute("match (a)-[]->(b) return a, b", row_handler=handle_row)
但我得到了错误:
`typeError: <function handle_row at ...> is not JSON serializable`
【问题讨论】: