Langchain-Chatchat
Langchain-Chatchat copied to clipboard
[BUG] 简洁阐述问题 / python init_database.py --recreate-vs
问题描述 / Problem Description 用简洁明了的语言描述这个问题 / Describe the problem in a clear and concise manner.
复现问题的步骤 / Steps to Reproduce
- 执行 '...' / Run '...'
- 点击 '...' / Click '...'
- 滚动到 '...' / Scroll to '...'
- 问题出现 / Problem occurs
预期的结果 / Expected Result 描述应该出现的结果 / Describe the expected result.
实际结果 / Actual Result 描述实际发生的结果 / Describe the actual result.
环境信息 / Environment Information
-
langchain-ChatGLM 版本/commit 号:0.2.10
-
是否使用 Docker 部署(是/否):no
-
使用的模型(ChatGLM2-6B / Qwen-7B 等):ChatGLM3-6B
-
使用的 Embedding 模型(moka-ai/m3e-base 等):bge-large-zh
-
使用的向量库类型 (faiss / milvus / pg_vector 等): faiss / Vector library used (faiss, milvus, pg_vector, etc.): faiss
-
操作系统及版本 / Operating system and version:win11
-
Python 版本 / Python version:3.10
-
其他相关环境信息 / Other relevant environment information:
附加信息 / Additional Information
添加与问题相关的任何其他信息 / >python init_database.py --recreate-vs
Traceback (most recent call last):
File "C:\soft\lc\init_database.py", line 3, in
🤖
哈喽,@cq134cq!很高兴再次遇见你。希望你今天过得不错!
根据我在Langchain-Chatchat仓库中找到的相关问题,这个问题可能是由于'pwd'模块是Unix特定的服务,而在Windows上并不可用导致的。'pwd'模块用于密码数据库,用于存储和访问用户信息。
解决这个问题,你需要找到在你的项目中哪里导入了'pwd'模块,并用Windows兼容的替代方案替换它。
然而,根据提供的上下文,'pwd'模块并没有在'init_database.py'文件中被导入。因此,错误必须发生在另一个文件或模块中,'init_database.py'依赖于这个文件或模块。
没有完整的代码库或导入'pwd'的具体文件,我无法提供具体的解决方案。
请提供导入'pwd'的文件或模块,以便我提供更准确的解决方案。
此外,我还找到了一些可能有用的解决方案:
-
你可以尝试降级
langchain-community
到0.0.19版本,因为在这个问题中,有用户提到0.0.20版本存在问题,他们将在修复后再发布新版本。你可以通过执行pip install langchain-community==0.0.19
来降级。 -
在这个问题中,有用户提到需要手动下载
bge-large-zh
模型,并修改model_config.py
文件中的EMBEDDING_MODEL
和MODEL_PATH
为模型存储的正确路径。然后运行python copy_config_example.py
来应用更改。 -
在这个问题中,有用户提到需要卸载并重新安装
pydantic
。你可以通过执行pip uninstall pydantic
和pip install pydantic
来完成。
希望这些信息对你有所帮助。如果你有更多的信息或问题,请随时提问。
Sources
- [BUG] 执行python init_database.py --recreate-vs时报错:MouduleNotFounndError:No module named 'pwd'
- [BUG] 3. 初始化知识库和配置文件 报错 python init_database.py --recreate-vs
- 4. 知识库初始化报错 python init_database.py --recreate-vs 请大佬帮忙看看什么问题
- init_database.py
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
pip install langchain-community==0.0.19 使用这个命令可以了,谢谢
(c:\soft\lc) C:\soft\lc>python init_database.py --recreate-vs recreating all vector stores 2024-02-22 13:57:09,547 - faiss_cache.py[line:92] - INFO: loading vector store in 'samples/vector_store/bge-large-zh' from disk. 2024-02-22 13:57:09,901 - SentenceTransformer.py[line:66] - INFO: Load pretrained SentenceTransformer: BAAI\bge-large-zh 2024-02-22 13:57:10,973 - embeddings_api.py[line:39] - ERROR: Torch not compiled with CUDA enabled AttributeError: 'NoneType' object has no attribute 'conjugate'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\soft\lc\init_database.py", line 107, in
pip install langchain-community==0.0.19 使用这个命令可以了,谢谢
我还是会报loop of ufunc does not support argument 0 of type Nodetype which has no callable conjugate method的错误。。。。
pip install langchain-community==0.0.19 使用这个命令可以了,谢谢
我也是用这个命令以后,开始报TypeError: loop of ufunc does not support argument 0 of type NoneType which has no callable conjugate method
你们的版本是0.2.10 langchain-ChatGLM 版本/commit 号:0.2.10
pip install langchain-community==0.0.19 使用这个命令可以了,谢谢
我也是用这个命令以后,开始报TypeError: loop of ufunc does not support argument 0 of type NoneType which has no callable conjugate method
请问你们这个怎么解决的呀
这个是embedding模型没全吧,我又一次遇到了这个问题后检查模型文件发现是没全,一个embed模型都是几个G,少了就是文件没全
同问