zhayujie / chatgpt-on-wechat

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

Home Page:https://docs.link-ai.tech/cow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

扫码成功后手机端无反应

PaperMisty opened this issue · comments

前置确认

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

问题描述

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

tmp4AB4

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

(已实名)

终端日志 (如有报错)

[在此处粘贴终端日志]

环境

  • 操作系统类型 (Mac/Windows/Linux):Windows10
  • Python版本 ( 执行 python3 -V ):python -3.10
  • pip版本 ( 依赖问题此项必填,执行 pip3 -V):

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

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

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

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

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

看这个 #8

commented

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

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

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

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

登录成功,发送消息报错
[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'

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

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

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

参考 #35

登录成功,发送消息报错 [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

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连不上了

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

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

@tianjiake @MinovskyRickland
网络问题见 #310

我每次扫描二维码后,都会有下面报错。哪位大神能告诉我该怎么解决?求教
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

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

commented

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

@devinglaw #333

扫码之后报:
[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
还是无法解决

@xiaozhiling2

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

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

扫码之后报: [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 还是无法解决

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

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

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

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

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

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

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

commented

发送信息后报错[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'

[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上装的,二维码出现的是?号,用不了,不知道怎么弄

[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.

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_x64__qbz5n2kfra8p0\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_x64__qbz5n2kfra8p0\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)

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

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

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

[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

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_x64__qbz5n2kfra8p0\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_x64__qbz5n2kfra8p0\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 配置文件,并确保所有的属性名称都被双引号括起来。

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_x64__qbz5n2kfra8p0\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_x64__qbz5n2kfra8p0\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,是不是呢?

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_x64__qbz5n2kfra8p0\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_x64__qbz5n2kfra8p0\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的版本。

发送信息后报错[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'

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

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

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

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

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

image
我直接啥都没

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

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

换成全局代理试试

commented

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

commented

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%7C1001_1682577062&
=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%7C1001_1682577062&_=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_wrap_socket(
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_in_tls)
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%7C1001_1682577062&
=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%7C1001_1682577062&_=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_wrap_socket(
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_in_tls)
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%7C1001_1682577062&
=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%7C1001_1682577062&_=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_wrap_socket(
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_in_tls)
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%7C1001_1682577062&
=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%7C1001_1682577062&_=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_wrap_socket(
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_in_tls)
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%7C1001_1682577062&
=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%7C1001_1682577062&_=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 这是什么原因 开了代理就会报错 不开 可以接受消息 但是没有回复

#952 (comment) 可以看看这个

commented

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

commented

[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

怎么解决

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

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

[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'

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

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

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

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

image
为什么我运行之后没反应,有没有大佬帮帮忙

image
为什么运行没反应啊。。。

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%7C1001_1682577062&=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%7C1001_1682577062&_=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_wrap_socket( 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_in_tls) 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%7C1001_1682577062&=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%7C1001_1682577062&_=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_wrap_socket( 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_in_tls) 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%7C1001_1682577062&=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%7C1001_1682577062&_=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_wrap_socket( 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_in_tls) 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%7C1001_1682577062&=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%7C1001_1682577062&_=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_wrap_socket( 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_in_tls) 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%7C1001_1682577062&=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%7C1001_1682577062&_=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 这是什么原因 开了代理就会报错 不开 可以接受消息 但是没有回复

问题一样,但是可以正常运行。关注高手解答以下问题。

Screen Shot 2023-06-15 at 4 34 31 PM

扫描完二维码 电脑上登录的微信 就自动退出了 用不了 只能在手机上面有?

PSConnectionPool(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 0x000002D29FA65150>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')))
[INFO][2023-06-21 10:57:23][wechat_channel.py:186] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]
我连接不到你的网络), receiver=@d7ac668d10b1af61c67205189a4a105b166ea8b732e395262adf51043609572e
请问链接不上网络这个怎么解决那?

为啥总是提示RateLimitError,一次都没成功过
CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[INFO][2023-07-02 15:16:45][wechat_channel.py:186] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]

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

你的问题解决了吗?我也遇到了同样的问题。能向您请教一下如何处理这个问题吗?

扫码连接以后,一给机器人发消息就报错。麻烦大家帮帮忙。
Traceback (most recent call last):
File "D:\zsm codes\python codes\chatgpt-on-wechat\lib\itchat\components\register.py", line 60, in configured_reply
r = replyFn(msg)
File "D:\zsm codes\python codes\chatgpt-on-wechat\channel\wechat\wechat_channel.py", line 77, in handler_single_msg
WechatChannel().handle_text(WeChatMessage(msg))
File "D:\zsm codes\python codes\chatgpt-on-wechat\common\time_check.py", line 36, in _time_checker
f(self, *args, **kwargs) # 未开启时间模块则直接回答
File "D:\zsm codes\python codes\chatgpt-on-wechat\channel\wechat\wechat_channel.py", line 106, in wrapper
return func(self, cmsg)
File "D:\zsm codes\python codes\chatgpt-on-wechat\channel\wechat\wechat_channel.py", line 315, in handle_text
context = self._compose_context(ContextType.TEXT, cmsg.content, isgroup=False, msg=cmsg)
File "D:\zsm codes\python codes\chatgpt-on-wechat\channel\chat_channel.py", line 89, in _compose_context
conn = sqlite3.connect("/home/ubuntu/apps/chatgpt-admin/db.sqlite3")
sqlite3.OperationalError: unable to open database file

image
本地运行没反应???

D:\project\open ai\chatgpt-on-wechat>python app.py
[INFO][2023-11-22 16:13:07][config.py:198] - 配置文件不存在,将使用config-template.json模板
[INFO][2023-11-22 16:13:07][config.py:227] - [INIT] load config: {'channel_type': 'wx', 'model': 'gpt-3.5-turbo', 'open_ai_api_key': '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', 'text_to_image': 'dall-e-2', 'voice_to_text': 'openai', 'text_to_voice': 'openai', 'proxy': '127.0.0.1:54217', 'hot_reload': False, 'single_chat_prefix': ['bot', '@bot'], 'single_chat_reply_prefix': '[bot] ', 'group_chat_prefix': ['@bot'], 'group_name_white_list': ['22222服【破阵༅相思】'], 'group_chat_in_one_session': ['22222服【破阵༅相思】'], 'image_create_prefix': ['画'], 'speech_recognition': True, 'group_speech_recognition': False, 'voice_reply_voice': False, 'conversation_max_tokens': 2500, 'expires_in_seconds': 3600, 'character_desc': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交 流。', 'temperature': 0.7, 'top_p': 1, 'subscribe_msg': '感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。', 'use_linkai': False, 'linkai_api_key': '', 'linkai_app_code': ''}
[INFO][2023-11-22 16:13:07][config.py:177] - [Config] User datas file not found, ignore.
[ERROR][2023-11-22 16:13:07][app.py:52] - App startup failed!
[ERROR][2023-11-22 16:13:07][app.py:53] - No module named 'requests'
Traceback (most recent call last):
File "app.py", line 45, in run
channel = channel_factory.create_channel(channel_name)
File "D:\project\open ai\chatgpt-on-wechat\channel\channel_factory.py", line 13, in create_channel
from channel.wechat.wechat_channel import WechatChannel
File "D:\project\open ai\chatgpt-on-wechat\channel\wechat\wechat_channel.py", line 13, in
import requests
ModuleNotFoundError: No module named 'requests

[INFO][2023-11-30 00:04:35][chat_gpt_bot.py:49] - [CHATGPT] query=晚上好
[WARNING][2023-11-30 00:04:35][chat_gpt_bot.py:150] - [CHATGPT] APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
[INFO][2023-11-30 00:04:35][wechat_channel.py:194] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]
我连接不到你的网络), receiver=@5

为啥自己给其他人发消息不会触发机器人,别人给自己私聊发消息以及自己在群里发都没问题,可以正常响应;但就是自己私聊给别人发不会触发,没有响应,这是咋回事儿?以下是我的config.json配置:

{
  "channel_type": "wx",
  "model": "gpt-3.5-turbo",
  "open_ai_api_key": "sk-yP469SimspVonANd594c708f5c084204806d44E3F7Ca",
  "text_to_image": "dall-e-3",
  "voice_to_text": "openai",
  "text_to_voice": "openai",
  "text_to_voice_model": "tts-1",
  "tts_voice_id": "alloy",
  "proxy": "",
  "hot_reload": true,
  "trigger_by_self": true,
  "single_chat_prefix": [
    "AA",
    "@robot"
  ],
  "single_chat_reply_prefix": "[bot] ",
  "group_chat_prefix": [
    "@robot",
    "A"
  ],
  "group_name_white_list": [
    "测试群-3",
    "测试群-2"
  ],
  "group_chat_in_one_session": [
    "ChatGPT测试群"
  ],
  "image_create_prefix": [
    ""
  ],
  "speech_recognition": true,
  "group_speech_recognition": false,
  "voice_reply_voice": true,
  "conversation_max_tokens": 2500,
  "expires_in_seconds": 3600,
  "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。",
  "temperature": 0.7,
  "top_p": 1,
  "subscribe_msg": "感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。",
  "use_linkai": false,
  "linkai_api_key": "",
  "linkai_app_code": ""
}