zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
30.85k stars 8.07k forks source link

我扫码登上以后,@bot时,后端有反应,但是报错:Traceback (most recent call last): File "F:\chatgpt-on-wechat-master\lib\itchat\components\register.py", line 63, in configured_reply r = replyFn(msg) File "F:\chatgpt-on-wechat-master\channel\wechat\wechat_channel.py", line 47, in handler_group_msg WechatChannel().handle_group(cmsg) File "F:\chatgpt-on-wechat-master\common\time_check.py", line 40, in _time_checker f(self, *args, **kwargs) # 未开启时间模块则直接回答 File "F:\chatgpt-on-wechat-master\channel\wechat\wechat_channel.py", line 57, in wrapper self.receivedMsgs[msgId] = True File "F:\chatgpt-on-wechat-master\common\expired_dict.py", line 18, in __setitem__ expiry_time = datetime.now() + timedelta(seconds=self.expires_in_seconds) TypeError: unsupported type for timedelta seconds component: NoneType #2148

Closed Richard-wsy closed 3 months ago

Richard-wsy commented 3 months ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Windows

运行的python版本是?

python 3.9

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

No response

问题描述 😯

我扫码登上以后,@bot时,后端有反应,但是报错:Traceback (most recent call last): File "F:\chatgpt-on-wechat-master\lib\itchat\components\register.py", line 63, in configured_reply r = replyFn(msg) File "F:\chatgpt-on-wechat-master\channel\wechat\wechat_channel.py", line 47, in handler_group_msg WechatChannel().handle_group(cmsg) File "F:\chatgpt-on-wechat-master\common\time_check.py", line 40, in _time_checker f(self, *args, **kwargs) # 未开启时间模块则直接回答 File "F:\chatgpt-on-wechat-master\channel\wechat\wechat_channel.py", line 57, in wrapper self.receivedMsgs[msgId] = True File "F:\chatgpt-on-wechat-master\common\expired_dict.py", line 18, in setitem expiry_time = datetime.now() + timedelta(seconds=self.expires_in_seconds) TypeError: unsupported type for timedelta seconds component: NoneType

终端日志 📒

<此处粘贴终端日志>
6vision commented 3 months ago

根目录配置文件加上 "expires_in_seconds": 3600,