[INFO][2024-05-31 14:19:46][bridge.py:61] - create bot dashscope for chat
[ERROR][2024-05-31 14:19:46][chat_channel.py:303] - Worker return exception: str expected, not NoneType
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 170, in _handle
reply = self._generate_reply(context)
File "/app/channel/chat_channel.py", line 193, in _generate_reply
reply = super().build_reply_content(context.content, context)
File "/app/channel/channel.py", line 38, in build_reply_content
return Bridge().fetch_reply_content(query, context)
File "/app/bridge/bridge.py", line 76, in fetch_reply_content
return self.get_bot("chat").reply(query, context)
File "/app/bridge/bridge.py", line 67, in get_bot
self.bots[typename] = create_bot(self.btype[typename])
File "/app/bot/bot_factory.py", line 55, in create_bot
return DashscopeBot()
File "/app/bot/dashscope/dashscope_bot.py", line 29, in __init__
os.environ["DASHSCOPE_API_KEY"] = self.api_key
File "/usr/local/lib/python3.10/os.py", line 685, in __setitem__
value = self.encodevalue(value)
File "/usr/local/lib/python3.10/os.py", line 757, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not NoneType
[INFO][2024-05-31 14:34:19][bridge.py:61] - create bot dashscope for chat
[ERROR][2024-05-31 14:34:19][chat_channel.py:303] - Worker return exception: str expected, not NoneType
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 170, in _handle
reply = self._generate_reply(context)
File "/app/channel/chat_channel.py", line 193, in _generate_reply
reply = super().build_reply_content(context.content, context)
File "/app/channel/channel.py", line 38, in build_reply_content
return Bridge().fetch_reply_content(query, context)
File "/app/bridge/bridge.py", line 76, in fetch_reply_content
return self.get_bot("chat").reply(query, context)
File "/app/bridge/bridge.py", line 67, in get_bot
self.bots[typename] = create_bot(self.btype[typename])
File "/app/bot/bot_factory.py", line 55, in create_bot
return DashscopeBot()
File "/app/bot/dashscope/dashscope_bot.py", line 29, in __init__
os.environ["DASHSCOPE_API_KEY"] = self.api_key
File "/usr/local/lib/python3.10/os.py", line 685, in __setitem__
value = self.encodevalue(value)
File "/usr/local/lib/python3.10/os.py", line 757, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not NoneType
Unexpected sync check result: window.synccheck={retcode:"1101",selector:"0"}
前置确认
⚠️ 搜索issues中是否已存在类似问题
操作系统类型?
Docker
运行的python版本是?
other
使用的chatgpt-on-wechat版本是?
Latest Release
运行的
channel
类型是?wx(个人微信, itchat)
复现步骤 🕹
问题描述 😯
Python版本 3.11.2
问题是每次对话都是会提示说他期望传入的是一个字符串类型,但传入的却是一个空类型,无法正常聊天;
测试对比
测试一
按上述步骤,我使用旧版本的COW(今年3月26安装的)、并且用的同一个oneapi的地址和key,成功进行对话。 这是对话不成功的,按上面步骤部署的:
这个是对话成功的,除镜像版本不同以外,其他步骤一致:
以下是两个版本的镜像从1panel的容器详情里面提取出来的镜像sha256值,供大佬参考
能跑的通的
跑不通的
测试二
按上述步骤、并替换COW这部分内容为fastgpt,其他部分保持不变;fastgpt依旧可以照常运行
与客服聊天后的猜测
这个调用后,直接拉起了阿里的bot机器人
希望的结果
与旧版本同样的操作下,要能够正常交流、对话
终端日志 📒