Closed ContrapunctusXIV closed 1 month ago
1、浏览器直接访问这个url提示什么? 2、接入微信等其他渠道是否正常?
`[INFO][2024-07-18 18:15:10][wechatcomapp_channel.py:133] - [wechatcom] receive params: <Storage {}> Traceback (most recent call last): File "/root/cow-bot/chatbot-venv/lib/python3.8/site-packages/web/utils.py", line 104, in getattr return self[key] KeyError: 'msg_signature'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/root/cow-bot/chatbot-venv/lib/python3.8/site-packages/web/application.py", line 280, in process return self.handle() File "/root/cow-bot/chatbot-venv/lib/python3.8/site-packages/web/application.py", line 271, in handle return self._delegate(fn, self.fvars, args) File "/root/cow-bot/chatbot-venv/lib/python3.8/site-packages/web/application.py", line 517, in _delegate return handle_class(cls) File "/root/cow-bot/chatbot-venv/lib/python3.8/site-packages/web/application.py", line 495, in handle_class return tocall(*args) File "/root/cow-bot/chatgpt-on-wechat/channel/wechatcom/wechatcomapp_channel.py", line 135, in GET signature = params.msg_signature File "/root/cow-bot/chatbot-venv/lib/python3.8/site-packages/web/utils.py", line 106, in getattr raise AttributeError(k) AttributeError: 'msg_signature'
116.25.243.146:57658 - - [18/Jul/2024 18:15:10] "HTTP/1.1 GET /wxcomapp" - 500 Internal Server Error`
应该是企微相关参数配置的问题,可以检查一下或者重新配置
我尝试了更换应用、更换企业、也把python版本降为了3.8,但都是同样的问题。根据企业微信文档,需要1秒内把请求内容返回回去,是不是这部分代码有调整?
找到解决方法了,可能是双网卡导致返回消息的ip与接收的不一致,禁用其中一个网卡后解决了。
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Linux
运行的python版本是?
python 3.10
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?other
复现步骤 🕹
测试个人微信通道可以使用后,根据文档配置企业微信相关参数,在配置“API接收消息”的“接收消息服务器配置”时点击确认
问题描述 😯
服务器可以接收到请求,似乎也正常返回了,但是不知道什么原因无法通过企业微信的验证
终端日志 📒