zhayujie / chatgpt-on-wechat

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

扫码登录成功后start auto replying 后发送信息bot触发无回复 #1733

Open descending-order opened 5 months ago

descending-order commented 5 months ago

前置确认

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

操作系统类型?

Windows

运行的python版本是?

python 3.8

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

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

git clone拉取 pip insatll -re,optional re python 运行成功扫二维码可以登录并start auto replying 配置用的是文心模型

问题描述 😯

应用没有被调用,经调试from bot猜想机器人没有创建成功,运行bot相关文件发现虚拟环境与自定义模块冲突,py文件找不到import

终端日志 📒

(weixin) C:\Users\zoey\Desktop\random\weixinGPT>C:/Users/zoey/anaconda3/envs/weixin/python.exe c:/Users/zoey/Desktop/random/weixinGPT/chatgpt-on-wechat/bot/bot_factory.py Traceback (most recent call last): File "c:/Users/zoey/Desktop/random/weixinGPT/chatgpt-on-wechat/bot/bot_factory.py", line 4, in from common import const ImportError: cannot import name 'const' from 'common' (C:\Users\zoey\anaconda3\envs\weixin\lib\site-packages\common__init__.py)

(weixin) C:\Users\zoey\Desktop\random\weixinGPT>C:/Users/zoey/anaconda3/envs/weixin/python.exe c:/Users/zoey/Desktop/random/weixinGPT/chatgpt-on-wechat/bot/bot.py Traceback (most recent call last): File "c:/Users/zoey/Desktop/random/weixinGPT/chatgpt-on-wechat/bot/bot.py", line 6, in from bridge.context import Context ModuleNotFoundError: No module named 'bridge'

(weixin) C:\Users\zoey\Desktop\random\weixinGPT>C:/Users/zoey/anaconda3/envs/weixin/python.exe c:/Users/zoey/Desktop/random/weixinGPT/chatgpt-on-wechat/bot/session_manager.py Traceback (most recent call last): File "c:/Users/zoey/Desktop/random/weixinGPT/chatgpt-on-wechat/bot/session_manager.py", line 1, in from common.expired_dict import ExpiredDict ModuleNotFoundError: No module named 'common.expired_dict'

zhayujie commented 5 months ago

建议直接用全局的Python3解释器试试,不要用 venv

descending-order commented 5 months ago

我全局的是3.11要卸掉重下嘛

zhayujie commented 5 months ago

我全局的是3.11要卸掉重下嘛

可以试下,不行就换低版本的,3.9

descending-order commented 5 months ago

好的好的,谢谢你

LuckMonkey2000 commented 5 months ago

我刚刚使用3.9也试了,没回复。所有流程都是按照教程来的,没有多余意外情况,就是没回复。连别人发消息给自己,都捕捉不到昵称。

descending-order commented 5 months ago

似乎还是没有解决这个问题,导入模块部分就是出了问题,我按照python导入语法试图import 退回到上级目录运行也还是说找不到模块诶

descending-order commented 5 months ago

C:\Users\zoey\Desktop\random\weixin>C:/Python311/python.exe c:/Users/zoey/Desktop/random/weixin/chatgpt-on-wechat/bot/bot_factory.py Traceback (most recent call last): File "c:\Users\zoey\Desktop\random\weixin\chatgpt-on-wechat\bot\bot_factory.py", line 4, in from common import const ModuleNotFoundError: No module named 'common'