RockChinQ / revLibs

ChatGPT、Claude QQ 机器人,以插件形式为 QChatGPT 项目接入ChatGPT、Claude、Bard、gpt4free等接口的逆向工程库
208 stars 17 forks source link

[BUG]处理消息时出现错误 raise Exception("Unknown error") #3

Closed Speechless22 closed 1 year ago

Speechless22 commented 1 year ago
Traceback (most recent call last):
  File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/main.py", line 88, in normal_message_received
    reply_message = procmsg.process_message(session_name=kwargs['launcher_type']+"_"+str(kwargs['launcher_id']),
  File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/procmsg.py", line 11, in process_message
    session: revss.RevSession = revss.get_session(session_name)
  File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/revss.py", line 69, in get_session
    __sessions__[name] = RevSession(name)
  File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/revss.py", line 26, in __init__
    self.__rev_interface_impl__: RevLibInterface = __rev_interface_impl_class__()
  File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/impls/v1impl.py", line 17, in __init__
    self.chatbot = Chatbot(
  File "/home/ubuntu/.local/lib/python3.10/site-packages/revChatGPT/V1.py", line 65, in __init__
    self.__login()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/revChatGPT/V1.py", line 99, in __login
    auth.begin()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 81, in begin
    self.__part_two()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 112, in __part_two
    self.__part_three(token=csrf_token)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 154, in __part_three
    self.__part_four(url=url)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 187, in __part_four
    self.__part_five(state=state)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 221, in __part_five
    self.__part_six(state=state)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 268, in __part_six
    raise Exception("Unknown error")
Exception: Unknown error
RockChinQ commented 1 year ago

尝试以下步骤:请先更新主程序 之后使用管理员账号私聊机器人发送指令:!plugin update,然后重启主程序。

Speechless22 commented 1 year ago

还是这样,我还发现用!update之类的命令也报错 [2023-02-17 20:30:40.527] main.py (121) - [ERROR] : [rev] Traceback (most recent call last): File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/main.py", line 112, in command_send reply_message = proccmd.process_command(session_name=kwargs['launchertype']+""+str(kwargs['launcher_id']), File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/proccmd.py", line 9, in process_command session: revss.RevSession = revss.get_session(session_name) File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/revss.py", line 70, in get_session sessions[name] = RevSession(name) File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/revss.py", line 26, in init self.rev_interface_impl: RevLibInterface = rev_interface_impl_class() File "/home/ubuntu/Femirins/QChatGPT/plugins/revLibs/pkg/process/impls/v1impl.py", line 17, in init self.chatbot = Chatbot( File "/home/ubuntu/.local/lib/python3.10/site-packages/revChatGPT/V1.py", line 65, in init self.login() File "/home/ubuntu/.local/lib/python3.10/site-packages/revChatGPT/V1.py", line 99, in login auth.begin() File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 81, in begin self.part_two() File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 112, in part_two self.part_three(token=csrf_token) File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 154, in part_three self.part_four(url=url) File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 187, in __part_four self.part_five(state=state) File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 221, in part_five self.__part_six(state=state) File "/home/ubuntu/.local/lib/python3.10/site-packages/OpenAIAuth/OpenAIAuth.py", line 268, in part_six raise Exception("Unknown error") Exception: Unknown error

RockChinQ commented 1 year ago

!update也报错?确认主程序更新完毕了吗?你提供的报错与!update指令无关;
近期!update指令执行时间非常长,大约需要45分钟才能完成自动更新,建议采取手动更新

Speechless22 commented 1 year ago

我的错,我一直改的QChatGPT/plugins/revLibs里的revcfg-template.py,原来不是这儿,现在好了👌