Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

AttributeError: 'NoneType' object has no attribute 'as_retriever'

Open colin4k opened this issue 1 year ago • 1 comments

环境:windows 11, anaconda/python 3.8 上传txt文件或者直接用默认的txt文件加载时报这个错误 langchain-ChatGLM README.md 未能成功加载 Traceback (most recent call last): File "D:\ProgramData\Anaconda3\envs\chatglm\lib\site-packages\gradio\routes.py", line 395, in run_predict output = await app.get_blocks().process_api( File "D:\ProgramData\Anaconda3\envs\chatglm\lib\site-packages\gradio\blocks.py", line 1193, in process_api result = await self.call_function( File "D:\ProgramData\Anaconda3\envs\chatglm\lib\site-packages\gradio\blocks.py", line 916, in call_function prediction = await anyio.to_thread.run_sync( File "D:\ProgramData\Anaconda3\envs\chatglm\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\ProgramData\Anaconda3\envs\chatglm\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\ProgramData\Anaconda3\envs\chatglm\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "webui.py", line 31, in get_answer resp, history = kb.get_knowledge_based_answer( File "E:\workspace\langchain-ChatGLM\knowledge_based_chatglm.py", line 95, in get_knowledge_based_answer retriever=vector_store.as_retriever(search_kwargs={"k": VECTOR_SEARCH_TOP_K}), AttributeError: 'NoneType' object has no attribute 'as_retriever'

colin4k avatar Apr 14 '23 01:04 colin4k