首页 > 解决方案 > neo4j-admin 导入“多行字段是非法的”

问题描述

我使用 neo4-admin 导入工具在 Neo4j 社区 4.1.2 中收到以下错误。

Caused by:ERROR in input
  data source: BufferedCharSeeker[source:/home/ubuntu/workspace/neo4j-community-4.1.2/bin/../import/nodes.csv, position:24455, line:359]
  in field: code:string:6
  for header: [id:ID, labels:LABEL, type:string, flags:string, lineno:string, code:string, childnum:string, funcid:string, classname:string, namespace:string, endlineno:string, name:string, doccomment:string]
  raw field value: 402
  original error: At /home/ubuntu/workspace/neo4j-community-4.1.2/bin/../import/nodes.csv @ position 24455 - Multi-line fields are illegal in this context and so this might suggest that there's a field with a start quote, but a missing end quote. See /home/ubuntu/workspace/neo4j-community-4.1.2/bin/../import/nodes.csv @ position 24455.

我用 hexedit 检查了每个单字节:

357,AST,string,,34,"/load.php",1,310,,"",,,
358,AST,AST_CALL,,37,,9,310,,"",,,
359,AST,AST_NAME,NAME_NOT_FQ,37,,0,310,,"",,,
360,AST,string,,37,"wp_check_php_mysql_versions",0,310,,"",,,
361,AST,AST_ARG_LIST,,37,,1,310,,"",,,
362,AST,AST_INCLUDE_OR_EVAL,EXEC_REQUIRE,40,,10,310,,"",,,

这是荒谬的情况:

我在 Github 上发现了一些问题,但被引用到 Neo4j 的旧版本......可能是什么原因?

标签: neo4j

解决方案


最后我找到了导致异常的行。

异常原因是正确的,但行号完全错误。

我通过在命令中添加以下标志--multiline-fields=true来 指出它。neo4j-admin import


推荐阅读