Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG/Help] <title>TypeError: 'NoneType' object is not callable #1486

Open
1 task done
Bryant6 opened this issue Jul 7, 2024 · 2 comments
Open
1 task done

[BUG/Help] <title>TypeError: 'NoneType' object is not callable #1486

Bryant6 opened this issue Jul 7, 2024 · 2 comments

Comments

@Bryant6
Copy link

Bryant6 commented Jul 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

response, history = model.chat(tokenizer, "你好", history=[]) 报错TypeError: 'NoneType' object is not callable。
history是什么类型的啊

Expected Behavior

No response

Steps To Reproduce

from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained(r"E:\workspace\QA\MindChat-main\THUDM\chatglm-6b-int4", trust_remote_code=True)
model = AutoModel.from_pretrained(r"E:\workspace\QA\MindChat-main\THUDM\chatglm-6b-int4", trust_remote_code=True).half()
response, history = model.chat(tokenizer, "你好", history=[])
print(response)

Environment

- OS: Window10
- Python:3.10
- Transformers:4.27.1
- PyTorch:2.3.1
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :False

Anything else?

No response

@lu598110900
Copy link

hove to solve it?

@DFMST
Copy link

DFMST commented Oct 12, 2024

这个我也遇到并解决了,你看看代码前面是否有gcc报错,我是gcc问题,安装5.1.0的gcc并重启pycharm就好了,网站如下:https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants