arangoimport:边缘属性缺失或无效
Posted
技术标签:
【中文标题】arangoimport:边缘属性缺失或无效【英文标题】:arangoimport: edge attribute missing or invalid 【发布时间】:2021-12-18 19:28:26 【问题描述】: ArangoDB 版本:3.8 存储引擎: 部署模式:单服务器 部署策略:手动启动 操作系统:Ubuntu 20.04 您机器中的总 RAM:32Gb 正在使用的磁盘: 使用过的包:受影响的功能:arangoimport
(base) raphy@pc:~$ arangodb
2021-11-04T09:34:45+01:00 |INFO| Starting arangodb version 0.15.3, build 814f8be component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Using storage engine 'rocksdb' component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Serving as master with ID 'ef664d42' on :8528... component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Waiting for 3 servers to show up.
component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Use the following commands to start other servers: component=arangodb
arangodb --starter.data-dir=./db2 --starter.join 127.0.0.1
arangodb --starter.data-dir=./db3 --starter.join 127.0.0.1
2021-11-04T09:34:45+01:00 |INFO| ArangoDB Starter listening on 0.0.0.0:8528 (:8528) component=arangodb
我正在尝试以这种方式 import
数据:
(base) raphy@pc:~$ arangoimport --server.database "ConceptNet" --collection "rel_type" "./ConceptNet/conceptnet.jsonl"
但我收到以下错误:
Connected to ArangoDB 'http+tcp://127.0.0.1:8529, version: 3.8.2, database: 'ConceptNet', username: 'root'
----------------------------------------
database: ConceptNet
collection: rel_type
create: no
create database: no
source filename: ./ConceptNet/conceptnet.jsonl
file type: json
threads: 2
on duplicate: error
connect timeout: 5
request timeout: 1200
----------------------------------------
Starting JSON import...
2021-11-04T14:49:48Z [165643] INFO [9ddf3] general processed 1945 bytes (3%) of input file
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 0: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"pm","_to":"am","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 1: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"red","_to":"amber","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 2: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"proprium","_to":"apelativum","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 3: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"s","_to":"beze\t","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 4: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"euphoria","_to":"bad_trip","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 5: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"gooder","_to":"badder","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 6: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"goodest","_to":"baddest","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 7: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"goodie","_to":"baddie","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2","contributor":"/s/resource/wiktionary/fr"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 8: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"windy","_to":"calm","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 9: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"anger","_to":"calm_down","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
2021-11-04T14:49:48Z [165643] WARNING [e5a29] general at position 10: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"get_angry","_to":"calm_down","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
created: 0
warnings/errors: 11
updated/replaced: 0
ignored: 0
这是我要导入的jsonl
文件:
conceptnet.jsonl
:
"_from":"pm","_to":"am","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
"_from":"red","_to":"amber","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"proprium","_to":"apelativum","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"s","_to":"beze\t","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"euphoria","_to":"bad_trip","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"gooder","_to":"badder","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"goodest","_to":"baddest","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"goodie","_to":"baddie","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2","contributor":"/s/resource>
"_from":"windy","_to":"calm","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"anger","_to":"calm_down","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
"_from":"get_angry","_to":"calm_down","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
我尝试修改jsonl
文件中的行如下:
"_from":"pm","_to":"am","rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
但还是会出现这个错误:
(base) raphy@pc:~$ arangoimport --server.database "ConceptNet" --collection "rel_type" "./ConceptNet/conceptnet.jsonl"
Please specify a password:
Connected to ArangoDB 'http+tcp://127.0.0.1:8529, version: 3.8.2, database: 'ConceptNet', username: 'root'
----------------------------------------
database: ConceptNet
collection: rel_type
create: no
create database: no
source filename: ./ConceptNet/conceptnet.jsonl
file type: json
threads: 2
on duplicate: error
connect timeout: 5
request timeout: 1200
----------------------------------------
Starting JSON import...
2021-11-04T18:48:55Z [37684] WARNING [e5a29] general at position 0: creating document failed with error 'edge attribute missing or invalid', offending document: "_from":"pm","_to":"am","rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
我做错了什么或错过了什么?如何解决问题?
【问题讨论】:
【参考方案1】:我发现将文件保存到jsonl
文件如下,可以解决问题:
conceptnet.jsonl
:
"_from":"conceptnet/pm","_to":"conceptnet/am","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"
"_from":"conceptnet/red","_to":"conceptnet/amber","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
"_from":"conceptnet/proprium","_to":"conceptnet/apelativum","rel":"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"
【讨论】:
以上是关于arangoimport:边缘属性缺失或无效的主要内容,如果未能解决你的问题,请参考以下文章