Langchain-Chatchat
Langchain-Chatchat copied to clipboard
[BUG] 加载chatglm模型报错:'NoneType' object has no attribute 'message_types_by_name'
问题描述 / Problem Description 加载chatglm模型报错:'NoneType' object has no attribute 'message_types_by_name',导致加载模型失败
复现问题的步骤 / Steps to Reproduce
执行 python webui.py或重新加载模型时报错(见最后一行):
Explicitly passing a revision
is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision
is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision
is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Downloading (…)/modeling_chatglm.py: 100%|███████████████████████████████████████████████████| 59.4k/59.4k [00:00<00:00, 493kB/s]
Downloading (…)main/quantization.py: 100%|███████████████████████████████████████████████████| 31.0k/31.0k [00:00<00:00, 215kB/s]
ERROR 2023-05-17 18:34:56,154-1d: 'NoneType' object has no attribute 'message_types_by_name'
环境信息 / Environment Information
- langchain-ChatGLM 版本/commit 号:commit a5417e1
- 是否使用 Docker 部署(是/否):否
- 使用的模型(ChatGLM-6B / ClueAI/ChatYuan-large-v2 等):ChatGLM-6B(v1.1.0或v0.1.0都报错)
- 使用的 Embedding 模型(GanymedeNil/text2vec-large-chinese 等):任何
- 操作系统及版本 / Operating system and version: Ubuntu Linux 18_04 LTS
- Python 版本 / Python version: 3.10.9
- 其他相关环境信息 / Other relevant environment information: CUDA
same problem here, fixed by update protobuf to 3.19.6
Traceback (most recent call last):
File "/mnt/workspace/langchain-ChatGLM/webui.py", line 7, in
dude, you are so nice! thats works for me, thank you
+1
Thanks, it works for me.
更新protobuf版本解决问题 pip install --upgrade protobuf==3.19.6