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

扫码成功后手机端无反应 #142

Closed PaperMisty closed 1 year ago

PaperMisty commented 1 year ago

前置确认

  1. 运行于国内网络环境,未开代理
  2. python 已安装:版本在 3.7 ~ 3.10 之间,依赖已安装
  3. 在已有 issue 中未搜索到类似问题
  4. FAQS 中无类似问题

问题描述

手机扫码成功后,windows终端显示Start auto replying

tmp4AB4

但手机没有任何新增的窗口提供聊天

(已实名)

终端日志 (如有报错)

[在此处粘贴终端日志]

环境

zhayujie commented 1 year ago

扫码成功之后你的账号就是机器人了,需要在手机端发送消息来触发,电脑端的终端仅是显示日志。

手机端不会有新开的窗口, 你可以让好友给你发送消息, 也可以自己给好友发送消息, 只要能命中触发条件都可触发自动回复

NardRage commented 1 year ago

请问一下扫描二维码老是超时应该怎么解决

zhayujie commented 1 year ago

请问一下扫描二维码老是超时应该怎么解决

看这个 #8

NardRage commented 1 year ago

多谢,已经修改源码,目前能够登录了

---原始邮件--- 发件人: @.> 发送时间: 2023年2月12日(周日) 下午2:17 收件人: @.>; 抄送: @.**@.>; 主题: Re: [zhayujie/chatgpt-on-wechat] 扫码成功后手机端无反应 (Issue #142)

请问一下扫描二维码老是超时应该怎么解决

看这个 #8

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

szf19951023 commented 1 year ago

扫码成功之后你的账号就是机器人了,需要在手机端发送消息来触发,电脑端的终端仅是显示日志。

手机端不会有新开的窗口, 你可以让好友给你发送消息, 也可以自己给好友发送消息, 只要能命中触发条件都可触发自动回复

  • 私聊中: 要发送以 single_chat_prefix配置作为前缀的消息, 如 "@bot 你好"
  • 群聊中: 好友艾特你就会触发, 你自己发送以 group_chat_prefix 配置为前缀的消息同样也会触发

想请问一下我怎么能取消掉别人在群组中@我自动回复这个功能呢

hankinsus commented 1 year ago

登录成功,发送消息报错 [ERROR][2023-02-21 22:09:59][wechat_channel.py:116] - No module named 'openai' Traceback (most recent call last): File "/home/ubuntu/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 112, in _do_send reply_text = super().build_reply_content(query, context) File "/home/ubuntu/chatgpt-on-wechat/channel/channel.py", line 31, in build_reply_content return Bridge().fetch_reply_content(query, context) File "/home/ubuntu/chatgpt-on-wechat/bridge/bridge.py", line 9, in fetch_reply_content return bot_factory.create_bot("openAI").reply(query, context) File "/home/ubuntu/chatgpt-on-wechat/bot/bot_factory.py", line 24, in create_bot from bot.openai.open_ai_bot import OpenAIBot File "/home/ubuntu/chatgpt-on-wechat/bot/openai/open_ai_bot.py", line 6, in import openai ModuleNotFoundError: No module named 'openai'

zhayujie commented 1 year ago

扫码成功之后你的账号就是机器人了,需要在手机端发送消息来触发,电脑端的终端仅是显示日志。 手机端不会有新开的窗口, 你可以让好友给你发送消息, 也可以自己给好友发送消息, 只要能命中触发条件都可触发自动回复

  • 私聊中: 要发送以 single_chat_prefix配置作为前缀的消息, 如 "@bot 你好"
  • 群聊中: 好友艾特你就会触发, 你自己发送以 group_chat_prefix 配置为前缀的消息同样也会触发

想请问一下我怎么能取消掉别人在群组中@我自动回复这个功能呢

参考 #35

zhayujie commented 1 year ago

登录成功,发送消息报错 [ERROR][2023-02-21 22:09:59][wechat_channel.py:116] - No module named 'openai' Traceback (most recent call last): File "/home/ubuntu/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 112, in _do_send reply_text = super().build_reply_content(query, context) File "/home/ubuntu/chatgpt-on-wechat/channel/channel.py", line 31, in build_reply_content return Bridge().fetch_reply_content(query, context) File "/home/ubuntu/chatgpt-on-wechat/bridge/bridge.py", line 9, in fetch_reply_content return bot_factory.create_bot("openAI").reply(query, context) File "/home/ubuntu/chatgpt-on-wechat/bot/bot_factory.py", line 24, in create_bot from bot.openai.open_ai_bot import OpenAIBot File "/home/ubuntu/chatgpt-on-wechat/bot/openai/open_ai_bot.py", line 6, in import openai ModuleNotFoundError: No module named 'openai'

88

MinovskyRickland commented 1 year ago

Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/completions (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fbea43ed880>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

升级之后api连不上了

jiaketian commented 1 year ago

你好,我这咋回事,就会一句话“请再问我一次吧, ”

openai.error.APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001D44786DB50>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。')) [INFO][2023-03-03 22:50:27][wechat_channel.py:103] - [WX] sendMsg=[bot] 请再问我一次吧, receiver=@8ee04d0292988f4d286ea29a3c92afe5afffbc4cfca74a74962f92ab5fc0d07c

zhayujie commented 1 year ago

@tianjiake @MinovskyRickland 网络问题见 #310

yinbaitao commented 1 year ago

我每次扫描二维码后,都会有下面报错。哪位大神能告诉我该怎么解决?求教 Please scan the QR code to log in. Please press confirm on your phone. [ERROR][2023-03-05 12:23:08][app.py:19] - App startup failed! [ERROR][2023-03-05 12:23:08][app.py:20] - mismatched tag: line 64, column 4 Traceback (most recent call last): File "/root/chatgpt-on-wechat/chatgpt-on-wechat/app.py", line 17, in channel.startup() File "/root/chatgpt-on-wechat/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "/root/miniconda3/lib/python3.10/site-packages/itchat/components/register.py", line 35, in auto_login self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback, File "/root/miniconda3/lib/python3.10/site-packages/itchat/components/login.py", line 53, in login status = self.check_login() File "/root/miniconda3/lib/python3.10/site-packages/itchat/components/login.py", line 137, in check_login if process_login_info(self, r.text): File "/root/miniconda3/lib/python3.10/site-packages/itchat/components/login.py", line 172, in process_login_info for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes: File "/root/miniconda3/lib/python3.10/xml/dom/minidom.py", line 2000, in parseString return expatbuilder.parseString(string) File "/root/miniconda3/lib/python3.10/xml/dom/expatbuilder.py", line 925, in parseString return builder.parseString(string) File "/root/miniconda3/lib/python3.10/xml/dom/expatbuilder.py", line 223, in parseString parser.Parse(string, True) xml.parsers.expat.ExpatError: mismatched tag: line 64, column 4

zhayujie commented 1 year ago

@yinbaitao 执行下下面两句 pip show itchat pip show itchat-uos

AthanaD commented 1 year ago

File "D:\Python\Python311\Lib\xml\dom\expatbuilder.py", line 223, in parseString parser.Parse(string, True) xml.parsers.expat.ExpatError: mismatched tag: line 64, column 4

zhayujie commented 1 year ago

@devinglaw #333

xiaozhiling2 commented 1 year ago

扫码之后报: [ERROR][2023-03-08 10:57:59][app.py:19] - App startup failed! [ERROR][2023-03-08 10:57:59][app.py:20] - mismatched tag: line 64, column 4 Traceback (most recent call last): File "E:\chatgpt-on-wechat\chatgpt-on-wechat-master\app.py", line 17, in channel.startup() File "E:\chatgpt-on-wechat\chatgpt-on-wechat-master\channel\wechat\wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "E:\python\lib\site-packages\itchat\components\register.py", line 35, in auto_login self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback, File "E:\python\lib\site-packages\itchat\components\login.py", line 53, in login status = self.check_login() File "E:\python\lib\site-packages\itchat\components\login.py", line 137, in check_login if process_login_info(self, r.text): File "E:\python\lib\site-packages\itchat\components\login.py", line 172, in process_login_info for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes: File "E:\python\lib\xml\dom\minidom.py", line 2000, in parseString return expatbuilder.parseString(string) File "E:\python\lib\xml\dom\expatbuilder.py", line 925, in parseString return builder.parseString(string) File "E:\python\lib\xml\dom\expatbuilder.py", line 223, in parseString parser.Parse(string, True) xml.parsers.expat.ExpatError: mismatched tag: line 64, column 4 也运行了: pip show itchat pip show itchat-uos 还是无法解决

zhayujie commented 1 year ago

@xiaozhiling2

正常应该是这样: pip3 show itchat-uos # 依赖存在 pip3 show itchat # 依赖不存在

所以要把 itcaht 卸载掉, 只需要itchat-uos 依赖

xiaozhiling2 commented 1 year ago

我卸载了,

------------------ 原始邮件 ------------------ 发件人: "zhayujie/chatgpt-on-wechat" @.>; 发送时间: 2023年3月9日(星期四) 凌晨0:47 @.>; @.**@.>; 主题: Re: [zhayujie/chatgpt-on-wechat] 扫码成功后手机端无反应 (Issue #142)

@xiaozhiling2

正常应该是这样: pip3 show itchat-uos # 依赖存在 pip3 show itchat # 依赖不存在

所以要把 itcaht 卸载掉, 只需要itchat-uos 依赖

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

zhibei2000 commented 1 year ago

扫码之后报: [ERROR][2023-03-08 10:57:59][app.py:19] - App startup failed! [ERROR][2023-03-08 10:57:59][app.py:20] - mismatched tag: line 64, column 4 Traceback (most recent call last): File "E:\chatgpt-on-wechat\chatgpt-on-wechat-master\app.py", line 17, in channel.startup() File "E:\chatgpt-on-wechat\chatgpt-on-wechat-master\channel\wechat\wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "E:\python\lib\site-packages\itchat\components\register.py", line 35, in auto_login self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback, File "E:\python\lib\site-packages\itchat\components\login.py", line 53, in login status = self.check_login() File "E:\python\lib\site-packages\itchat\components\login.py", line 137, in check_login if process_login_info(self, r.text): File "E:\python\lib\site-packages\itchat\components\login.py", line 172, in process_login_info for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes: File "E:\python\lib\xml\dom\minidom.py", line 2000, in parseString return expatbuilder.parseString(string) File "E:\python\lib\xml\dom\expatbuilder.py", line 925, in parseString return builder.parseString(string) File "E:\python\lib\xml\dom\expatbuilder.py", line 223, in parseString parser.Parse(string, True) xml.parsers.expat.ExpatError: mismatched tag: line 64, column 4 也运行了: pip show itchat pip show itchat-uos 还是无法解决

解决了么,一直是这个问题

zhibei2000 commented 1 year ago

@yinbaitao 执行下下面两句 pip show itchat pip show itchat-uos

xml.parsers.expat.ExpatError: mismatched tag: line 64, column 4

这个问题执行完还是解决不了的

zhayujie commented 1 year ago

@zhibei2000 执行这两个命令只是看看依赖安装是否正常,你把执行的结果贴出来看看吧

正常应该是这样: pip3 show itchat-uos # 依赖存在 pip3 show itchat # 依赖不存在

xiaozhiling2 commented 1 year ago

------------------ 原始邮件 ------------------ 发件人: "zhayujie/chatgpt-on-wechat" @.***>;

发送时间: 2023年3月11日(星期六) 晚上9:08 @.>; @*.**@*.***>; 主题: Re: [zhayujie/chatgpt-on-wechat] 扫码成功后手机端无反应 (Issue #142)

@zhibei2000 执行这两个命令只是看看依赖安装是否正常,你把执行的结果贴出来看看吧

正常应该是这样: pip3 show itchat-uos # 依赖存在 pip3 show itchat # 依赖不存在

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

eshao2018 commented 1 year ago

扫码后就出一个请在手机确认的提示,手机确认后,终端无任何提示,微信已经实名老号且绑卡,但是直接扫码登陆网页版微信,提示为了保障你的帐号安全,暂不支持使用网页版微信。是微信号的问题吗

flyleee commented 1 year ago

发送信息后报错[ERROR][2023-03-26 15:06:52][wechat_channel.py:29] - Worker return exception: module 'openai.error' has no attribute 'Timeout' Traceback (most recent call last): File "/root/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 100, in reply_text response = openai.ChatCompletion.create( AttributeError: module 'openai' has no attribute 'ChatCompletion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 210, in handle reply = super().build_reply_content(context.content, context) File "/root/chatgpt-on-wechat/channel/channel.py", line 33, in build_reply_content return Bridge().fetch_reply_content(query, context) File "/root/chatgpt-on-wechat/bridge/bridge.py", line 42, in fetch_reply_content return self.get_bot("chat").reply(query, context) File "/root/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 55, in reply reply_content = self.reply_text(session, session_id, 0) File "/root/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 121, in reply_text except openai.error.Timeout as e: AttributeError: module 'openai.error' has no attribute 'Timeout'

eshao2018 commented 1 year ago

e界家族很好的一个交流分享、交友寻找快乐论坛。 

jarodlong7788 commented 1 year ago

[INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin GODCMD not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin BANWORDS not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin ROLE not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin DUNGEON not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin HELLO not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][godcmd.py:135] - [Godcmd] inited [WARNING][2023-03-27 01:27:46][banwords.py:41] - Banwords init failed: [Errno 2] No such file or directory: '/root/chatgpt-on-wechat/plugins/banwords/banwords.txt', ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords . 我的是DOCKER上装的,二维码出现的是?号,用不了,不知道怎么弄

jarodlong7788 commented 1 year ago

[INFO][2023-03-27 01:27:46][plugin_manager.py:39] - Loading plugins config... [INFO][2023-03-27 01:27:46][plugin_manager.py:55] - Scaning plugins ... [INFO][2023-03-27 01:27:46][plugin_manager.py:30] - Plugin Hello_v0.1 registered [WARNING][2023-03-27 01:27:46][plugin_manager.py:68] - Failed to import plugin sdwebui: No module named 'webuiapi' [INFO][2023-03-27 01:27:46][plugin_manager.py:30] - Plugin Godcmd_v1.0 registered [INFO][2023-03-27 01:27:46][plugin_manager.py:30] - Plugin Role_v1.0 registered [INFO][2023-03-27 01:27:46][plugin_manager.py:30] - Plugin Banwords_v1.0 registered [INFO][2023-03-27 01:27:46][plugin_manager.py:30] - Plugin Dungeon_v1.0 registered [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin GODCMD not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin BANWORDS not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin ROLE not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin DUNGEON not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][plugin_manager.py:78] - Plugin HELLO not found in pconfig, adding to pconfig... [INFO][2023-03-27 01:27:46][godcmd.py:135] - [Godcmd] inited [WARNING][2023-03-27 01:27:46][banwords.py:41] - Banwords init failed: [Errno 2] No such file or directory: '/root/chatgpt-on-wechat/plugins/banwords/banwords.txt', ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords . [INFO][2023-03-27 01:27:46][role.py:46] - [Role] inited [INFO][2023-03-27 01:27:46][dungeon.py:43] - [Dungeon] inited [INFO][2023-03-27 01:27:46][hello.py:15] - [Hello] inited Getting uuid of QR code. Downloading QR code.

zhurong2020 commented 1 year ago

win11下安装后,出现以下错误提示,哪位能指点一下? [ERROR][2023-03-26 19:41:24][app.py:16] - App startup failed! [ERROR][2023-03-26 19:41:24][app.py:17] - Expecting property name enclosed in double quotes: line 2 column 102 (char 104) Traceback (most recent call last): File "C:\Users\wuxia\chatgpt-on-wechat\app.py", line 8, in config.load_config() File "C:\Users\wuxia\chatgpt-on-wechat\config.py", line 18, in load_config config = json.loads(config_str) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\json\init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 102 (char 104)

jarodlong7788 commented 1 year ago

我的是DOCKER上装的,二维码出现的是?号,用不了,不知道怎么弄

jarodlong7788 commented 1 year ago

下载的二维码前面有^M 这个问题可能是因为在 Windows 系统中编写的代码在 Unix 系统上执行时引起的。在 Windows 上编辑文件时,行结束符是 "\r\n"(也称为 CRLF),但在 Unix 上,行结束符是 "\n"(也称为 LF)。当你在 Windows 上编辑代码并将其上传到 Unix 系统时,这些 "\r" 字符可能会在 Unix 中被解释为特殊字符,从而导致不良的行为。

解决方法是将文件中的 "\r" 字符替换为 "\n"。你可以使用 sed 命令执行此操作:是那个文件出问题了?

jarodlong7788 commented 1 year ago

[INFO][2023-03-27 01:47:01][plugin_manager.py:30] - Plugin Banwords_v1.0 registered [INFO][2023-03-27 01:47:01][plugin_manager.py:30] - Plugin Dungeon_v1.0 registered [INFO][2023-03-27 01:47:01][godcmd.py:135] - [Godcmd] inited [WARNING][2023-03-27 01:47:01][banwords.py:41] - Banwords init failed: [Errno 2] No such file or directory: '/chatgpt-on-wechat/plugins/banwords/banwords.txt', ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords . [INFO][2023-03-27 01:47:01][role.py:46] - [Role] inited [INFO][2023-03-27 01:47:01][dungeon.py:43] - [Dungeon] inited [INFO][2023-03-27 01:47:01][hello.py:15] - [Hello] inited Getting uuid of QR code. Downloading QR code. ^M██████████████████████████████████████████████████████████████████████████████ ██ ████ ████ ████████ ██ ████ ██ ██████ ██ ██ ██████████ ████ ██ ██ ████████ ████████ ████████ ██████████ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████████ ██ ██ ██ ██ ██ ██ ██ ████ ████ ████ ██ ██ ████ ██ ██���███ ██ ██ ██ ██ ██████████ ██████ ██ ██ ██ ████ ██████ ██████████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████████████████████ ██ ██████ ████████ ████ ██ ██████████████████ ████████ ██ ██ ████ ██ ████████ ██ ██████████████████ ██████ ████ ██ ██ ████████████ ████████ ████ ██ ████ ██ ████ ████ ██████ ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ████ ██ ████ ████ ██ ████ ██ ██ ████ ██ ██ ██ ██ ██ ██ ████ ██ ██ ████████ ██ ██████ ████ ██ ██████ ██ ████████████████ ██ ████ ████ ██ ████ ████ ██ ██████ ██████ ██ ██ ██ ████ ██ ██ ████ ██ ██ ██ ██ ██ ████████ ████ ██ ██████ ████ ██ ██████ ██ ████ ████ ██████ ██ ██████████ ██ ██████ ██ ████ ██ ████ ██ ██ ██ ██ ████ ████ ████ ██ ██ ██ ��█ ██ ██████ ████ ██ ██ ██ ██ ██ ██ ████ ██ ██████ ████ ██████ ████ ██ ██ "nohup.out" 3582L, 548286C

jarodlong7788 commented 1 year ago

win11下安装后,出现以下错误提示,哪位能指点一下? [ERROR][2023-03-26 19:41:24][app.py:16] - App startup failed! [ERROR][2023-03-26 19:41:24][app.py:17] - Expecting property name enclosed in double quotes: line 2 column 102 (char 104) Traceback (most recent call last): File "C:\Users\wuxia\chatgpt-on-wechat\app.py", line 8, in config.load_config() File "C:\Users\wuxia\chatgpt-on-wechat\config.py", line 18, in load_config config = json.loads(config_str) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\jsoninit.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 102 (char 104)

这是一个 JSON 解码错误,通常发生在 JSON 字符串中存在无效的语法或格式错误时。从错误信息来看,似乎是在第 2 行的第 102 列(即第 104 个字符)发现了一个不符合预期的属性名称,可能是由于该属性名称没有用双引号括起来导致的。您可以检查您的 JSON 配置文件,并确保所有的属性名称都被双引号括起来。

zhurong2020 commented 1 year ago

win11下安装后,出现以下错误提示,哪位能指点一下? [ERROR][2023-03-26 19:41:24][app.py:16] - App startup failed! [ERROR][2023-03-26 19:41:24][app.py:17] - Expecting property name enclosed in double quotes: line 2 column 102 (char 104) Traceback (most recent call last): File "C:\Users\wuxia\chatgpt-on-wechat\app.py", line 8, in config.load_config() File "C:\Users\wuxia\chatgpt-on-wechat\config.py", line 18, in load_config config = json.loads(config_str) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\jsoninit.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 102 (char 104)

这是一个 JSON 解码错误,通常发生在 JSON 字符串中存在无效的语法或格式错误时。从错误信息来看,似乎是在第 2 行的第 102 列(即第 104 个字符)发现了一个不符合预期的属性名称,可能是由于该属性名称没有用双引号括起来导致的。您可以检查您的 JSON 配置文件,并确保所有的属性名称都被双引号括起来。

非常感谢,我找不到配置文件错误,重新拷贝了原来的,解决了这个配置文件的问题。不过又出现了一个新问题: [ERROR][2023-03-26 21:49:00][app.py:16] - App startup failed! [ERROR][2023-03-26 21:49:00][app.py:17] - No module named 'itchat' Traceback (most recent call last): File "C:\Users\wuxia\chatgpt-on-wechat\app.py", line 11, in channel = channel_factory.create_channel("wx") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\wuxia\chatgpt-on-wechat\channel\channel_factory.py", line 12, in create_channel from channel.wechat.wechat_channel import WechatChannel File "C:\Users\wuxia\chatgpt-on-wechat\channel\wechat\wechat_channel.py", line 7, in import itchat ModuleNotFoundError: No module named 'itchat' 但使用pip list查看,发现itchat装过了 itchat 1.3.10 itchat-uos 1.5.0.dev0 openai 0.27.2 pip 20.2.3 还看到有人说,只能装itchat-uos不能装itchat,是不是呢?

jarodlong7788 commented 1 year ago

win11下安装后,出现以下错误提示,哪位能指点一下? [ERROR][2023-03-26 19:41:24][app.py:16] - App startup failed! [ERROR][2023-03-26 19:41:24][app.py:17] - Expecting property name enclosed in double quotes: line 2 column 102 (char 104) Traceback (most recent call last): File "C:\Users\wuxia\chatgpt-on-wechat\app.py", line 8, in config.load_config() File "C:\Users\wuxia\chatgpt-on-wechat\config.py", line 18, in load_config config = json.loads(config_str) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\jsoninit.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64qbz5n2kfra8p0\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 102 (char 104)

这是一个 JSON 解码错误,通常发生在 JSON 字符串中存在无效的语法或格式错误时。从错误信息来看,似乎是在第 2 行的第 102 列(即第 104 个字符)发现了一个不符合预期的属性名称,可能是由于该属性名称没有用双引号括起来导致的。您可以检查您的 JSON 配置文件,并确保所有的属性名称都被双引号括起来。

非常感谢,我找不到配置文件错误,重新拷贝了原来的,解决了这个配置文件的问题。不过又出现了一个新问题: [ERROR][2023-03-26 21:49:00][app.py:16] - App startup failed! [ERROR][2023-03-26 21:49:00][app.py:17] - No module named 'itchat' Traceback (most recent call last): File "C:\Users\wuxia\chatgpt-on-wechat\app.py", line 11, in channel = channel_factory.create_channel("wx") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\wuxia\chatgpt-on-wechat\channel\channel_factory.py", line 12, in create_channel from channel.wechat.wechat_channel import WechatChannel File "C:\Users\wuxia\chatgpt-on-wechat\channel\wechat\wechat_channel.py", line 7, in import itchat ModuleNotFoundError: No module named 'itchat' 但使用pip list查看,发现itchat装过了 itchat 1.3.10 itchat-uos 1.5.0.dev0 openai 0.27.2 pip 20.2.3 还看到有人说,只能装itchat-uos不能装itchat,是不是呢? 这个错误信息提示找不到模块'itchat'。可能您的应用程序使用的Python解释器与'itchat'安装的解释器不同。

解决这个问题,可以尝试以下步骤:

确保应用程序使用正确的Python版本。您可以通过打印sys.version或sys.executable的输出来检查应用程序使用的Python版本。

如果您的系统上安装了多个Python版本,请确保使用正确的pip安装包的Python版本。您可以使用pip --version来检查pip的版本。

totemfeeling commented 1 year ago

发送信息后报错[ERROR][2023-03-26 15:06:52][wechat_channel.py:29] - Worker return exception: module 'openai.error' has no attribute 'Timeout' Traceback (most recent call last): File "/root/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 100, in reply_text response = openai.ChatCompletion.create( AttributeError: module 'openai' has no attribute 'ChatCompletion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 210, in handle reply = super().build_reply_content(context.content, context) File "/root/chatgpt-on-wechat/channel/channel.py", line 33, in build_reply_content return Bridge().fetch_reply_content(query, context) File "/root/chatgpt-on-wechat/bridge/bridge.py", line 42, in fetch_reply_content return self.get_bot("chat").reply(query, context) File "/root/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 55, in reply reply_content = self.reply_text(session, session_id, 0) File "/root/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 121, in reply_text except openai.error.Timeout as e: AttributeError: module 'openai.error' has no attribute 'Timeout'

解决了吗?我也遇到这个问题

ilmare11 commented 1 year ago

登录成功 也显示Start auto replying. 但是在指定的群里@bot 没用反应,是什么问题

jarodlong7788 commented 1 year ago

登录成功也显示开始自动回复。但在指定的群里@bot不用反应,是什么问题

json 文件里没有添加群的名字,或者没有群名

hy546880109 commented 1 year ago

image 我搭建了本地但是报网络错误 配置如下 image

MabusBao commented 1 year ago

image 我直接啥都没

yinjw1995 commented 1 year ago

本地运行时,首先关闭代理可以扫码登录,并且也可以正常接收信息,但是这时候获取不了API的返回信息,如果重开代理又会中断,这个问题是如何解决的?或者怎么操作呀,求大神指导

jarodlong7788 commented 1 year ago

本地运行时,首先关闭代理可以扫码登录,并且也可以正常接收信息,但是这时候获取不了API的返回信息,如果重开代理又会中断,这个问题是如何解决的?或者怎么操作呀,求大神指导

换成全局代理试试

wuxxh commented 1 year ago

请问国外服务器代理地址和端口该怎么设置呢,一直显示我链接不到你的网络

kiritonull commented 1 year ago

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python\lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "D:\Python\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578965257&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489355 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 356, in sync_check r = self.s.get(url, params=params, headers=headers, File "D:\Python\lib\site-packages\requests\sessions.py", line 600, in get return self.request("GET", url, kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "D:\Python\lib\site-packages\requests\adapters.py", line 518, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578965257&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489355 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 295, in maintain_loop i = sync_check(self) File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 360, in sync_check if not isinstance(e.args[0].args[1], BadStatusLine): IndexError: tuple index out of range

Traceback (most recent call last): File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen self._prepare_proxy(conn) File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 996, in _prepare_proxy conn.connect() File "D:\Python\lib\site-packages\urllib3\connection.py", line 369, in connect self.sock = conn = self._connect_tls_proxy(hostname, conn) File "D:\Python\lib\site-packages\urllib3\connection.py", line 504, in _connect_tls_proxy socket = ssl_wrapsocket( File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "D:\Python\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "D:\Python\lib\ssl.py", line 1040, in _create self.do_handshake() File "D:\Python\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1124)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python\lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "D:\Python\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578966274&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489356 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 356, in sync_check r = self.s.get(url, params=params, headers=headers, File "D:\Python\lib\site-packages\requests\sessions.py", line 600, in get return self.request("GET", url, kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "D:\Python\lib\site-packages\requests\adapters.py", line 518, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578966274&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489356 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 295, in maintain_loop i = sync_check(self) File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 360, in sync_check if not isinstance(e.args[0].args[1], BadStatusLine): IndexError: tuple index out of range

Traceback (most recent call last): File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen self._prepare_proxy(conn) File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 996, in _prepare_proxy conn.connect() File "D:\Python\lib\site-packages\urllib3\connection.py", line 369, in connect self.sock = conn = self._connect_tls_proxy(hostname, conn) File "D:\Python\lib\site-packages\urllib3\connection.py", line 504, in _connect_tls_proxy socket = ssl_wrapsocket( File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "D:\Python\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "D:\Python\lib\ssl.py", line 1040, in _create self.do_handshake() File "D:\Python\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1124)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python\lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "D:\Python\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578967312&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489357 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 356, in sync_check r = self.s.get(url, params=params, headers=headers, File "D:\Python\lib\site-packages\requests\sessions.py", line 600, in get return self.request("GET", url, kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "D:\Python\lib\site-packages\requests\adapters.py", line 518, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578967312&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489357 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 295, in maintain_loop i = sync_check(self) File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 360, in sync_check if not isinstance(e.args[0].args[1], BadStatusLine): IndexError: tuple index out of range

Traceback (most recent call last): File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen self._prepare_proxy(conn) File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 996, in _prepare_proxy conn.connect() File "D:\Python\lib\site-packages\urllib3\connection.py", line 369, in connect self.sock = conn = self._connect_tls_proxy(hostname, conn) File "D:\Python\lib\site-packages\urllib3\connection.py", line 504, in _connect_tls_proxy socket = ssl_wrapsocket( File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "D:\Python\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "D:\Python\lib\ssl.py", line 1040, in _create self.do_handshake() File "D:\Python\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1124)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python\lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "D:\Python\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578968344&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489358 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 356, in sync_check r = self.s.get(url, params=params, headers=headers, File "D:\Python\lib\site-packages\requests\sessions.py", line 600, in get return self.request("GET", url, kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "D:\Python\lib\site-packages\requests\adapters.py", line 518, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578968344&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489358 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 295, in maintain_loop i = sync_check(self) File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 360, in sync_check if not isinstance(e.args[0].args[1], BadStatusLine): IndexError: tuple index out of range

Traceback (most recent call last): File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen self._prepare_proxy(conn) File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 996, in _prepare_proxy conn.connect() File "D:\Python\lib\site-packages\urllib3\connection.py", line 369, in connect self.sock = conn = self._connect_tls_proxy(hostname, conn) File "D:\Python\lib\site-packages\urllib3\connection.py", line 504, in _connect_tls_proxy socket = ssl_wrapsocket( File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_intls) File "D:\Python\lib\site-packages\urllib3\util\ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "D:\Python\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "D:\Python\lib\ssl.py", line 1040, in _create self.do_handshake() File "D:\Python\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1124)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python\lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( File "D:\Python\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "D:\Python\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578969364&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489359 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 356, in sync_check r = self.s.get(url, params=params, headers=headers, File "D:\Python\lib\site-packages\requests\sessions.py", line 600, in get return self.request("GET", url, kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "D:\Python\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "D:\Python\lib\site-packages\requests\adapters.py", line 518, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='webpush.wx2.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/synccheck?r=1682578969364&skey=%40crypt_3be373d6_8d52a879d031ad6e84615900b417cc4b&sid=4dbqAbchmBI38xBc&uin=111757440&deviceid=e423466606511065&synckey=1_835796417%7C2_835797723%7C3_835797552%7C11_835797308%7C19_33016%7C23_1682578487%7C24_1682578694%7C27_1485040%7C201_1682578694%7C206_103%7C1000_1682577060%7C10011682577062&=1682578489359 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 295, in maintain_loop i = sync_check(self) File "D:\Project\ikemen\chatgpt-on-wechat\lib\itchat\components\login.py", line 360, in sync_check if not isinstance(e.args[0].args[1], BadStatusLine): IndexError: tuple index out of range 这是什么原因 开了代理就会报错 不开 可以接受消息 但是没有回复

lanvent commented 1 year ago

https://github.com/zhayujie/chatgpt-on-wechat/issues/952#issuecomment-1521706915 可以看看这个

kiritonull commented 1 year ago

Start auto replying. [INFO][2023-04-27 15:47:12][chat_channel.py:104] - [WX]receive group at 收到@请求了 但是没反应啊

r24r commented 1 year ago

[INFO][2023-04-28 11:49:14][chat_gpt_bot.py:49] - [CHATGPT] query=你好 [WARNING][2023-04-28 11:49:21][chat_gpt_bot.py:138] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000173A3B8B690>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))) [INFO][2023-04-28 11:49:21][wechat_channel.py:187] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] 我连接不到你的网络), receiver=@0db641552ddaf7d69dac7891761c2681664c812b32b4b777f2be685368d7d59f

怎么解决

gh393872102 commented 1 year ago

麻烦问下~ 个人账户一切都ok 如果我想用公众号来回复的话 应该如何配置 谢谢

LuckyBigHead commented 1 year ago

返回消息一直是 [ERROR]我现在有点累了,等会再来吧

scottbanban commented 1 year ago

[INFO][2023-05-11 01:41:07][config.py:145] - [Config] User datas file not found, ignore. [ERROR][2023-05-11 01:41:07][app.py:52] - App startup failed! [ERROR][2023-05-11 01:41:07][app.py:53] - No module named 'requests' Traceback (most recent call last): File "C:\Users\hnist\chatgpt-on-wechat\app.py", line 45, in run channel = channel_factory.create_channel(channel_name) File "C:\Users\hnist\chatgpt-on-wechat\channel\channel_factory.py", line 13, in create_channel from channel.wechat.wechat_channel import WechatChannel File "C:\Users\hnist\chatgpt-on-wechat\channel\wechat\wechat_channel.py", line 13, in import requests ModuleNotFoundError: No module named 'requests'

这个是什么问题,可以怎么解决?

wanquanY commented 1 year ago

扫码成功之后你的账号就是机器人了,需要在手机端发送消息来触发,电脑端的终端仅是显示日志。

手机端不会有新开的窗口, 你可以让好友给你发送消息, 也可以自己给好友发送消息, 只要能命中触发条件都可触发自动回复

  • 私聊中: 要发送以 single_chat_prefix配置作为前缀的消息, 如 "@bot 你好"
  • 群聊中: 好友艾特你就会触发, 你自己发送以 group_chat_prefix 配置为前缀的消息同样也会触 image