[英]How to load lists of lists as string in neo4j using py2neo
我有示例 param_list-
param_list = [{
"labels" : ["test"],
"properties" : {"some_list" : "[['sample', 'testing']]"}
}]
並擁有 cypher 模板-
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
Neo4j 不支持作為列表列表的屬性值。
嘗試將[['sample', 'testing']]
更改為['sample', 'testing']
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.