Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 扫码登录成功显示start auto replying 后发送信息无反应如何排查 #2197

Open
6vision opened this issue Aug 1, 2024 · 15 comments
Labels
community tutorial Helpful tutorials or operational instructions by community members, may be outdated

Comments

@6vision
Copy link
Collaborator

6vision commented Aug 1, 2024

如果显示 start auto replying,项目环境依赖应该没什么问题了,可以参考如下步骤排查:

1、在没有修改配置文件里的私聊触发词"single_chat_prefix"的前提下,私聊默认触发词是 bot,所以使用其他微信号给 扫码的机器人微信 私聊发送 bot 你好。如果有反应,那就按需修改触发词参数 "single_chat_prefix" "group_chat_prefix",以及群聊白名单 "group_name_white_list"即可,参考配置说明

2、重新运行项目,然后再按照1 操作。

3、在根目录的配置文件加个参数 "debug": true, 再按照2操作,看是否有报错,根据具体报错来修改~

4、如果修改过配置文件,从模板重新生成有效的config.json配置文件,什么都不要修改,直接启动项目,然后按照 1 来继续排查

@6vision 6vision added status: needs check community tutorial Helpful tutorials or operational instructions by community members, may be outdated and removed status: needs check labels Aug 1, 2024
@6vision 6vision pinned this issue Aug 1, 2024
@huangjeake
Copy link

好友给我发消息可以接收到,但是用手机扫码登录之后再用手机给好友消息,这条消息就收不到。大佬有遇到过吗?

@6vision 6vision mentioned this issue Oct 14, 2024
2 tasks
@xingxinag
Copy link

[ERROR][2024-11-04 07:26:11][chat_channel.py:303] - Worker return exception: can only concatenate list (not "str") to list
Traceback (most recent call last):
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/channel/chat_channel.py", line 176, in _handle
reply = self._decorate_reply(context, reply)
File "/app/channel/chat_channel.py", line 261, in _decorate_reply
reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "")
TypeError: can only concatenate list (not "str") to list
client_loop: send disconnect: Broken pipe
➜ sdcard
config.json
Screenshot_2024-11-04-15-47-49-479_bin mt plus
怎么试了都不行。

@6vision
Copy link
Collaborator Author

6vision commented Nov 5, 2024

[ERROR][2024-11-04 07:26:11][chat_channel.py:303] - Worker return exception: can only concatenate list (not "str") to list Traceback (most recent call last): File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/app/channel/chat_channel.py", line 176, in _handle reply = self._decorate_reply(context, reply) File "/app/channel/chat_channel.py", line 261, in _decorate_reply reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "") TypeError: can only concatenate list (not "str") to list client_loop: send disconnect: Broken pipe ➜ sdcard config.json Screenshot_2024-11-04-15-47-49-479_bin mt plus 怎么试了都不行。

image
你用的不是openai直连的key吧,返回的文本应该不是字符串,所以报错

@xingxinag
Copy link

对,我用的是gemini 可以在后台日志里面看见他回复了,但是微信里面他不会发送。

@6vision
Copy link
Collaborator Author

6vision commented Nov 5, 2024

对,我用的是gemini 可以在后台日志里面看见他回复了,但是微信里面他不会发送。

那问题应该在其他地方,可以提供更多日志看看

@xingxinag
Copy link

ubuntu@instance-20240805-1204:$ sudo docker logs -f chatgpt-on-wechat
[ERROR][2024-11-04 04:09:29][config.py:261] - Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/app/config.py", line 245, in drag_sensitive
conf_dict: dict = json.loads(config)
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[ERROR][2024-11-04 04:09:29][app.py:66] - App startup failed!
[ERROR][2024-11-04 04:09:29][app.py:67] - Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/app/app.py", line 46, in run
load_config()
File "/app/config.py", line 277, in load_config
config = Config(json.loads(config_str))
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ubuntu@instance-20240805-1204:
$

@xingxinag
Copy link

对,我用的是gemini 可以在后台日志里面看见他回复了,但是微信里面他不会发送。

那问题应该在其他地方,可以提供更多日志看看

Screenshot_2024-11-06-22-09-39-616_bin mt plus
Screenshot_2024-11-06-22-04-29-991_bin mt plus
这两个新的日志你看看

@6vision
Copy link
Collaborator Author

6vision commented Nov 7, 2024

image
配置文件这俩参数的格式可能用问题,截图看看

@xingxinag
Copy link

image 配置文件这俩参数的格式可能用问题,截图看看

config.json
Screenshot_2024-11-07-15-45-20-199_bin mt plus

这是我的原配置文件和截图。

@6vision
Copy link
Collaborator Author

6vision commented Nov 7, 2024

image 配置文件这俩参数的格式可能用问题,截图看看

config.json Screenshot_2024-11-07-15-45-20-199_bin mt plus

这是我的原配置文件和截图。

两个问题:
1、json文件不要用# 注释,不能有注释
2、不要改参数配置的格式,是双引号的不要在外面加中括号,中括号的也不要再在外面加双引号,加了就改变了类型了,就会报错

@xingxinag
Copy link

image 配置文件这俩参数的格式可能用问题,截图看看

config.json Screenshot_2024-11-07-15-45-20-199_bin mt plus
这是我的原配置文件和截图。

两个问题: 1、json文件不要用# 注释,不能有注释 2、不要改参数配置的格式,是双引号的不要在外面加中括号,中括号的也不要再在外面加双引号,加了就改变了类型了,就会报错

好哒好哒。 谢谢你啦! 明天我再试试。

@xingxinag
Copy link

image 配置文件这俩参数的格式可能用问题,截图看看

config.json Screenshot_2024-11-07-15-45-20-199_bin mt plus
这是我的原配置文件和截图。

两个问题: 1、json文件不要用# 注释,不能有注释 2、不要改参数配置的格式,是双引号的不要在外面加中括号,中括号的也不要再在外面加双引号,加了就改变了类型了,就会报错

还是不行呀。
Screenshot_2024-11-08-15-45-14-232_bin mt plus
Screenshot_2024-11-08-15-44-26-326_bin mt plus
Screenshot_2024-11-08-15-37-49-302_bin mt plus
😭

@xingxinag
Copy link

image 配置文件这俩参数的格式可能用问题,截图看看

config.json Screenshot_2024-11-07-15-45-20-199_bin mt plus
这是我的原配置文件和截图。

两个问题: 1、json文件不要用# 注释,不能有注释 2、不要改参数配置的格式,是双引号的不要在外面加中括号,中括号的也不要再在外面加双引号,加了就改变了类型了,就会报错

还是不行呀。 Screenshot_2024-11-08-15-45-14-232_bin mt plus Screenshot_2024-11-08-15-44-26-326_bin mt plus Screenshot_2024-11-08-15-37-49-302_bin mt plus 😭

我都改成这样子了,他喵的他还报错
Screenshot_2024-11-08-16-11-34-300_bin mt plus
Screenshot_2024-11-08-16-11-19-769_bin mt plus

@xingxinag
Copy link

image 配置文件这俩参数的格式可能用问题,截图看看

config.json Screenshot_2024-11-07-15-45-20-199_bin mt plus
这是我的原配置文件和截图。

两个问题: 1、json文件不要用# 注释,不能有注释 2、不要改参数配置的格式,是双引号的不要在外面加中括号,中括号的也不要再在外面加双引号,加了就改变了类型了,就会报错

好哒好哒。 谢谢你啦! 明天我再试试。

我他喵的改的啥都没了,还报错。
Screenshot_2024-11-08-16-22-42-479_bin mt plus
Screenshot_2024-11-08-16-19-29-428_bin mt plus

@xingxinag
Copy link

肯定是项目里面。 Python脚本。有错

@6vision 6vision mentioned this issue Dec 22, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community tutorial Helpful tutorials or operational instructions by community members, may be outdated
Projects
None yet
Development

No branches or pull requests

3 participants