0

我有示例 param_list-

param_list = [{
    "labels" : ["test"],
    "properties" : {"some_list" : "[['sample', 'testing']]"}
}]

并有密码模板-

cypher_template = """UNWIND $batch as row
CALL apoc.create.node(row.labels, row.properties) yield node
RETURN count(*)"""
result = graph.run(cypher_template, {"batch" : cypher_list})

for i in result:
    print (i)

当我运行 cypher 语句时,出现以下错误:

py2neo.database.ClientError: ProcedureCallFailed: Failed to invoke procedure `apoc.create.node`: Caused by: java.lang.IllegalArgumentException: [[Ljava.util.ArrayList;@125e2edb:[Ljava.util.ArrayList;] is not a supported property value

即使我将属性值作为字符串类型,我仍然会收到此错误消息,指出不支持列表列表。

py2neo == 4.3.0 neo4j == 4.0.0

4

1 回答 1

1

Neo4j 不支持作为列表列表的属性值。

尝试更改[['sample', 'testing']]['sample', 'testing'].

于 2020-07-27T16:18:14.817 回答