Error: 图数据库上传显示错误:添加实体失败: Unterminated string starting at: line 1 column 23 (char 22)
1️⃣ 描述一下问题
图数据库上传.jsonl文件出错
2️⃣ 报错日志
请运行以下命令,并提供部分相关日志:
2025-06-30 16:40:23 - ERROR - Yuxi - 添加实体失败: Unterminated string starting at: line 1 column 23 (char 22), Traceback (most recent call last): File "/app/server/routers/data_router.py", line 186, in add_graph_entity await graph_base.jsonl_file_add_entity(file_path, kgdb_name) File "/app/src/core/graphbase.py", line 233, in jsonl_file_add_entity triples = list(read_triples(file_path)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/src/core/graphbase.py", line 231, in read_triples yield json.loads(line.strip()) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 23 (char 22)
3️⃣ 相关截图
#️⃣ 其他相关信息
✅ 如果问题与模型调用相关,请尝试切换到其他在线模型
test 文件夹下的样例数据能否正常上传
test文件夹下的数据是可以的,我自己创建的不可以,想问下是什么原因。另外,还想请教下,test下面的样例数据(jsonl文件)是如何根据txt文件创建的