MaxKB icon indicating copy to clipboard operation
MaxKB copied to clipboard

[BUG] PDF上传知识库开始导入接口报错

Open SimonGino opened this issue 1 year ago • 1 comments

联系方式

[email protected]

MaxKB 版本

问题描述

fetch("http://localhost:3000/api/dataset/8247a95a-fbd2-11ee-862c-12ae5ded608b/document/_bach", { "headers": { "accept": "application/json, text/plain, /", "accept-language": "zh-CN,zh;q=0.9,en;q=0.8", "authorization": ":1rwcwH:sFyPjbaWlgwcuyV-Yy_gCnJv2N2HunScacyfkuSQiSQ", "content-type": "application/json", "sec-ch-ua": ""Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": ""macOS"", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin" }, "referrer": "http://localhost:3000/ui/dataset/upload?id=8247a95a-fbd2-11ee-862c-12ae5ded608b", "referrerPolicy": "strict-origin-when-cross-origin", "body": "xxxxxx(文件 pumpkin_book.pdf 见附件)", "method": "POST", "mode": "cors", "credentials": "include" });

重现步骤

WX20240416-172508@2x

期待的正确结果

No response

相关日志输出

[{'paragraphs': [{}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}, {}, {'content': [ErrorDetail(string='Null characters are not allowed.', code='null_characters_not_allowed')]}, {}]}]

附加信息

开始导入的上一个接口http://localhost:3000/api/dataset/document/split ,split_model.py的get_level_block()方法里这段lstrip(level_content_list[level_content_index]['content'])会解析出 1 m0 X x∈X0 ϕ(x) #T ϕ (xj) = m0 m X i=1 m X j=1 αiαj " 1 m0 X x∈X0 ϕ (xi)T ϕ(x)

这样的内容,但是他们不属于我原文件内容。

SimonGino avatar Apr 16 '24 09:04 SimonGino

感谢反馈,我们需要排查一下问题。 方便的话文件可以邮件发送给 [email protected],我们排查起来会更快。

baixin513 avatar Apr 16 '24 10:04 baixin513

原来只要替换空字符,已验证,可以导入成功了,感谢!

SimonGino avatar Apr 17 '24 01:04 SimonGino