Closed mk1990 closed 2 months ago
报错详情:
2024-07-09 14:36:44,946 root 63 INFO UnstructuredFileLoader used for /usr/local/lib/python3.11/site-packages/chatchat/data/knowledge_base/tt/content/三国.txt
2024-07-09 14:36:44,949 root 63 ERROR ModuleNotFoundError: 从文件 tt/三国.txt 加载文档时出错:No module named 'unstructured_inference.inference.ordering'
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/chatchat/server/knowledge_base/utils.py", line 424, in files2docs_in_thread_file2docs
return True, (file.kb_name, file.filename, file.file2text(**kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/chatchat/server/knowledge_base/utils.py", line 399, in file2text
docs = self.file2docs()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/chatchat/server/knowledge_base/utils.py", line 354, in file2docs
self.docs = loader.load()
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/langchain_core/document_loaders/base.py", line 29, in load
return list(self.lazy_load())
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 88, in lazy_load
elements = self._get_elements()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 168, in _get_elements
from unstructured.partition.auto import partition
File "/usr/local/lib/python3.11/site-packages/unstructured/partition/auto.py", line 81, in
+1 No module named 'unstructured_inference.inference.ordering'
+1 没有名为“unstructured_inference.inference.ordering”的模块
你们都是docker部署吗
有没有可能是版本太新了!
ordering这个文件没有,去历史版本找个ordering文件
pip install unstructured==0.11.0
0.3.1 版已经发布,优化了配置方式,修改配置项无需重启服务器,可以更新尝试。
问题描述 / Problem Description 知识库管理功能添加txt格式知识库报错,chatchat后台报错ModuleNotFoundError: No module named 'unstructured_inference.inference.ordering'。
复现问题的步骤 / Steps to Reproduce
预期的结果 / Expected Result
实际结果 / Actual Result
环境信息 / Environment Information
附加信息 / Additional Information 无