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

对接fastgtp 4.8.10-alpha一直提示[ERROR][2024-08-29 17:31:10][chat_channel.py:303] - Worker return exception: can only concatenate str (not "list") to str #2275

Closed
2 tasks done
SDAIer opened this issue Aug 29, 2024 · 2 comments

Comments

@SDAIer
Copy link

SDAIer commented Aug 29, 2024

前置确认

  • 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

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

  • 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Linux

运行的python版本是?

other

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

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

扫码登陆后,发消息,然后日志如下
Please press confirm on your phone.
chatgpt-on-wechat | Loading the contact, this may take a little while.
chatgpt-on-wechat | <PIL.PngImagePlugin.PngImageFile image mode=1 size=450x450 at 0x7F9FC731F490>
chatgpt-on-wechat | [INFO][2024-08-29 17:31:01][wechat_channel.py:131] - Wechat login success, user_id: @42c6cc54764e1eecdf3b3a4f5ec70e0a80be63fef26fcc7a84ac556658a8b3d7, nickname: ~
chatgpt-on-wechat | Start auto replying.
chatgpt-on-wechat | [INFO][2024-08-29 17:31:02][bridge.py:68] - create bot chatGPT for chat
chatgpt-on-wechat | [INFO][2024-08-29 17:31:02][chat_gpt_bot.py:49] - [CHATGPT] query=hi
chatgpt-on-wechat | [ERROR][2024-08-29 17:31:10][chat_channel.py:303] - Worker return exception: can only concatenate str (not "list") to str
chatgpt-on-wechat | Traceback (most recent call last):
chatgpt-on-wechat | File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
chatgpt-on-wechat | result = self.fn(*self.args, **self.kwargs)
chatgpt-on-wechat | File "/app/channel/chat_channel.py", line 176, in _handle
chatgpt-on-wechat | reply = self._decorate_reply(context, reply)
chatgpt-on-wechat | File "/app/channel/chat_channel.py", line 261, in _decorate_reply
chatgpt-on-wechat | reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "")
chatgpt-on-wechat | TypeError: can only concatenate str (not "list") to str

问题描述 😯

chatgpt-on-wechat | Please press confirm on your phone.
chatgpt-on-wechat | Loading the contact, this may take a little while.
chatgpt-on-wechat | <PIL.PngImagePlugin.PngImageFile image mode=1 size=450x450 at 0x7F9FC731F490>
chatgpt-on-wechat | [INFO][2024-08-29 17:31:01][wechat_channel.py:131] - Wechat login success, user_id: @42c6cc54764e1eecdf3b3a4f5ec70e0a80be63fef26fcc7a84ac556658a8b3d7, nickname: ~
chatgpt-on-wechat | Start auto replying.
chatgpt-on-wechat | [INFO][2024-08-29 17:31:02][bridge.py:68] - create bot chatGPT for chat
chatgpt-on-wechat | [INFO][2024-08-29 17:31:02][chat_gpt_bot.py:49] - [CHATGPT] query=hi
chatgpt-on-wechat | [ERROR][2024-08-29 17:31:10][chat_channel.py:303] - Worker return exception: can only concatenate str (not "list") to str
chatgpt-on-wechat | Traceback (most recent call last):
chatgpt-on-wechat | File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
chatgpt-on-wechat | result = self.fn(*self.args, **self.kwargs)
chatgpt-on-wechat | File "/app/channel/chat_channel.py", line 176, in _handle
chatgpt-on-wechat | reply = self._decorate_reply(context, reply)
chatgpt-on-wechat | File "/app/channel/chat_channel.py", line 261, in _decorate_reply
chatgpt-on-wechat | reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "")
chatgpt-on-wechat | TypeError: can only concatenate str (not "list") to str
^CGracefully stopping... (press Ctrl+C again to force)

终端日志 📒

Please press confirm on your phone.
chatgpt-on-wechat  | Loading the contact, this may take a little while.
chatgpt-on-wechat  | <PIL.PngImagePlugin.PngImageFile image mode=1 size=450x450 at 0x7F9FC731F490>
chatgpt-on-wechat  | [INFO][2024-08-29 17:31:01][wechat_channel.py:131] - Wechat login success, user_id: @42c6cc54764e1eecdf3b3a4f5ec70e0a80be63fef26fcc7a84ac556658a8b3d7, nickname: ~
chatgpt-on-wechat  | Start auto replying.
chatgpt-on-wechat  | [INFO][2024-08-29 17:31:02][bridge.py:68] - create bot chatGPT for chat
chatgpt-on-wechat  | [INFO][2024-08-29 17:31:02][chat_gpt_bot.py:49] - [CHATGPT] query=hi
chatgpt-on-wechat  | [ERROR][2024-08-29 17:31:10][chat_channel.py:303] - Worker return exception: can only concatenate str (not "list") to str
chatgpt-on-wechat  | Traceback (most recent call last):
chatgpt-on-wechat  |   File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
chatgpt-on-wechat  |     result = self.fn(*self.args, **self.kwargs)
chatgpt-on-wechat  |   File "/app/channel/chat_channel.py", line 176, in _handle
chatgpt-on-wechat  |     reply = self._decorate_reply(context, reply)
chatgpt-on-wechat  |   File "/app/channel/chat_channel.py", line 261, in _decorate_reply
chatgpt-on-wechat  |     reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "")
chatgpt-on-wechat  | TypeError: can only concatenate str (not "list") to str


@6vision
Copy link
Collaborator

6vision commented Sep 3, 2024

可能回复的格式不是字符串,所以报错。reply_text 需要是字符串格式

@xingxinag
Copy link

可能回复的格式不是字符串,所以报错。reply_text 需要是字符串格式

不行的
config.json
你看我这个文件里不管怎么改。还总是报错。
[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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants