File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\bot.py", line 54, in
loop.run_until_complete(asyncio.gather(*bots))
│ │ │ │ └ [<Task pending name='Task-2' coro=<start_task() running at C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs...
│ │ │ └ <function gather at 0x0000028EDC0FFD80>
│ │ └ <module 'asyncio' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\pytho...
│ └ <function BaseEventLoop.run_until_complete at 0x0000028EDC128C20>
└
File "asyncio\base_events.py", line 640, in run_until_complete
sock.setblocking(False)
File "asyncio\windows_events.py", line 321, in run_forever
File "asyncio\base_events.py", line 607, in run_forever
sock.close()
File "asyncio\base_events.py", line 1922, in _run_once
File "asyncio\events.py", line 80, in _run
self._loop = loop
│ └ <member '_loop' of 'Handle' objects>
└ <Handle <TaskStepMethWrapper object at 0x0000028EE59211E0>()>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\platforms\onebotbot.py", line 151, in
await handle_message(
└ <function handle_message at 0x0000028EE58F8680>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 261, in handle_message
conversation_handler.current_conversation = await conversation_handler.create(
│ │ │ └ <function ConversationHandler.create at 0x0000028EE58FA020>
│ │ └ <conversation.ConversationHandler object at 0x0000028EE5938490>
│ └ None
└ <conversation.ConversationHandler object at 0x0000028EE5938490>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 294, in create
conversation = ConversationContext(_type, self.session_id)
│ │ │ └ 'friend-2843224266'
│ │ └ <conversation.ConversationHandler object at 0x0000028EE5938490>
│ └ 'chatgpt-api'
└ <class 'conversation.ConversationContext'>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 92, in init
self.adapter = ChatGPTAPIAdapter(self.session_id)
│ │ │ └ 'friend-2843224266'
│ │ └ <conversation.ConversationContext object at 0x0000028EE5938710>
│ └ <class 'adapter.chatgpt.api.ChatGPTAPIAdapter'>
└ <conversation.ConversationContext object at 0x0000028EE5938710>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\chatgpt\api.py", line 29, in init
self.bot = OpenAIChatbot(
│ │ └ <class 'revChatGPT.V3.Chatbot'>
│ └ None
└ <adapter.chatgpt.api.ChatGPTAPIAdapter object at 0x0000028EE5939050>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 97, in init
if self.get_token_count("default") > self.max_tokens:
│ │ │ └ 4000
│ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE58F58D0>
│ └ <function Chatbot.get_token_count at 0x0000028EE53E2660>
└ <revChatGPT.V3.Chatbot object at 0x0000028EE58F58D0>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 142, in get_token_count
encoding = tiktoken.encoding_for_model(self.engine)
│ │ │ └ 'gpt-3.5-turbo'
│ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE58F58D0>
│ └ <function encoding_for_model at 0x0000028EE53E25C0>
└ <module 'tiktoken' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib...
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\model.py", line 75, in encoding_for_model
return get_encoding(encoding_name)
│ └ 'cl100k_base'
└ <function get_encoding at 0x0000028EE53E28E0>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\registry.py", line 63, in get_encoding
enc = Encoding(**constructor())
│ └ <function cl100k_base at 0x0000028EE5912480>
└ <class 'tiktoken.core.Encoding'>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken_ext\openai_public.py", line 64, in cl100k_base
mergeable_ranks = load_tiktoken_bpe(
└ <function load_tiktoken_bpe at 0x0000028EE59122A0>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 117, in load_tiktoken_bpe
return {
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 119, in
for token, rank in (line.split() for line in contents.splitlines() if line)
│ └ b'64364'
└ b'LWNu'
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\bot.py", line 54, in
loop.run_until_complete(asyncio.gather(*bots))
│ │ │ │ └ [<Task pending name='Task-2' coro=<start_task() running at C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs...
│ │ │ └ <function gather at 0x0000028EDC0FFD80>
│ │ └ <module 'asyncio' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\pytho...
│ └ <function BaseEventLoop.run_until_complete at 0x0000028EDC128C20>
└
File "asyncio\base_events.py", line 640, in run_until_complete
sock.setblocking(False)
File "asyncio\windows_events.py", line 321, in run_forever
File "asyncio\base_events.py", line 607, in run_forever
sock.close()
File "asyncio\base_events.py", line 1922, in _run_once
File "asyncio\events.py", line 80, in _run
self._loop = loop
│ └ <member '_loop' of 'Handle' objects>
└ <Handle <TaskStepMethWrapper object at 0x0000028EE5E7FDC0>()>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\platforms\onebotbot.py", line 151, in
await handle_message(
└ <function handle_message at 0x0000028EE58F8680>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 261, in handle_message
conversation_handler.current_conversation = await conversation_handler.create(
│ │ │ └ <function ConversationHandler.create at 0x0000028EE58FA020>
│ │ └ <conversation.ConversationHandler object at 0x0000028EE5938490>
│ └ None
└ <conversation.ConversationHandler object at 0x0000028EE5938490>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 294, in create
conversation = ConversationContext(_type, self.session_id)
│ │ │ └ 'friend-2843224266'
│ │ └ <conversation.ConversationHandler object at 0x0000028EE5938490>
│ └ 'chatgpt-api'
└ <class 'conversation.ConversationContext'>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 92, in init
self.adapter = ChatGPTAPIAdapter(self.session_id)
│ │ │ └ 'friend-2843224266'
│ │ └ <conversation.ConversationContext object at 0x0000028EE5A32490>
│ └ <class 'adapter.chatgpt.api.ChatGPTAPIAdapter'>
└ <conversation.ConversationContext object at 0x0000028EE5A32490>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\chatgpt\api.py", line 29, in init
self.bot = OpenAIChatbot(
│ │ └ <class 'revChatGPT.V3.Chatbot'>
│ └ None
└ <adapter.chatgpt.api.ChatGPTAPIAdapter object at 0x0000028EE5A38D50>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 97, in init
if self.get_token_count("default") > self.max_tokens:
│ │ │ └ 4000
│ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE5A39A50>
│ └ <function Chatbot.get_token_count at 0x0000028EE53E2660>
└ <revChatGPT.V3.Chatbot object at 0x0000028EE5A39A50>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 142, in get_token_count
encoding = tiktoken.encoding_for_model(self.engine)
│ │ │ └ 'gpt-3.5-turbo'
│ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE5A39A50>
│ └ <function encoding_for_model at 0x0000028EE53E25C0>
└ <module 'tiktoken' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib...
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\model.py", line 75, in encoding_for_model
return get_encoding(encoding_name)
│ └ 'cl100k_base'
└ <function get_encoding at 0x0000028EE53E28E0>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\registry.py", line 63, in get_encoding
enc = Encoding(**constructor())
│ └ <function cl100k_base at 0x0000028EE5912480>
└ <class 'tiktoken.core.Encoding'>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken_ext\openai_public.py", line 64, in cl100k_base
mergeable_ranks = load_tiktoken_bpe(
└ <function load_tiktoken_bpe at 0x0000028EE59122A0>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 117, in load_tiktoken_bpe
return {
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 119, in
for token, rank in (line.split() for line in contents.splitlines() if line)
│ └ b'64364'
└ b'LWNu'
提交 issue 前,请先确认:
表现
描述 BUG 的表现情况
运行环境:
复现步骤
描述你是如何触发这个 BUG 的 发送任何消息都是:“出现故障!如果这个问题持 续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。 原因:not enough values to unpack (expected 2, got 1)” 发送重置会话没有用。
LOGS
2023-07-29 13:40:41.189 | DEBUG | platforms.onebotbot::148 - 私聊消息:您好 2023-07-29 13:40:41.317 | ERROR | universal:handle_message:295 - not enough values to unpack (expected 2, got 1) Traceback (most recent call last):
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\bot.py", line 54, in
loop.run_until_complete(asyncio.gather(*bots))
│ │ │ │ └ [<Task pending name='Task-2' coro=<start_task() running at C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs...
│ │ │ └ <function gather at 0x0000028EDC0FFD80>
│ │ └ <module 'asyncio' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\pytho...
│ └ <function BaseEventLoop.run_until_complete at 0x0000028EDC128C20>
└
File "asyncio\base_events.py", line 640, in run_until_complete sock.setblocking(False)
File "asyncio\windows_events.py", line 321, in run_forever
File "asyncio\base_events.py", line 607, in run_forever sock.close()
File "asyncio\base_events.py", line 1922, in _run_once
File "asyncio\events.py", line 80, in _run self._loop = loop │ └ <member '_loop' of 'Handle' objects> └ <Handle <TaskStepMethWrapper object at 0x0000028EE59211E0>()>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\platforms\onebotbot.py", line 151, in await handle_message( └ <function handle_message at 0x0000028EE58F8680>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 294, in create conversation = ConversationContext(_type, self.session_id) │ │ │ └ 'friend-2843224266' │ │ └ <conversation.ConversationHandler object at 0x0000028EE5938490> │ └ 'chatgpt-api' └ <class 'conversation.ConversationContext'>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 92, in init self.adapter = ChatGPTAPIAdapter(self.session_id) │ │ │ └ 'friend-2843224266' │ │ └ <conversation.ConversationContext object at 0x0000028EE5938710> │ └ <class 'adapter.chatgpt.api.ChatGPTAPIAdapter'> └ <conversation.ConversationContext object at 0x0000028EE5938710>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\chatgpt\api.py", line 29, in init self.bot = OpenAIChatbot( │ │ └ <class 'revChatGPT.V3.Chatbot'> │ └ None └ <adapter.chatgpt.api.ChatGPTAPIAdapter object at 0x0000028EE5939050>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 97, in init if self.get_token_count("default") > self.max_tokens: │ │ │ └ 4000 │ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE58F58D0> │ └ <function Chatbot.get_token_count at 0x0000028EE53E2660> └ <revChatGPT.V3.Chatbot object at 0x0000028EE58F58D0> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 142, in get_token_count encoding = tiktoken.encoding_for_model(self.engine) │ │ │ └ 'gpt-3.5-turbo' │ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE58F58D0> │ └ <function encoding_for_model at 0x0000028EE53E25C0> └ <module 'tiktoken' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib... File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\model.py", line 75, in encoding_for_model return get_encoding(encoding_name) │ └ 'cl100k_base' └ <function get_encoding at 0x0000028EE53E28E0> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\registry.py", line 63, in get_encoding enc = Encoding(**constructor()) │ └ <function cl100k_base at 0x0000028EE5912480> └ <class 'tiktoken.core.Encoding'> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken_ext\openai_public.py", line 64, in cl100k_base mergeable_ranks = load_tiktoken_bpe( └ <function load_tiktoken_bpe at 0x0000028EE59122A0> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 117, in load_tiktoken_bpe return { File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 119, in
for token, rank in (line.split() for line in contents.splitlines() if line)
│ └ b'64364'
└ b'LWNu'
ValueError: not enough values to unpack (expected 2, got 1) 2023-07-29 13:40:41.447 | DEBUG | platforms.onebot_bot:respond:112 - [OneBot] 尝试发送消息:出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见 。 原因:not enough values to unpack (expected 2, got 1) 2023-07-29 13:40:46.184 | DEBUG | platforms.onebotbot::148 - 私聊消息:重置会话 2023-07-29 13:40:46.299 | ERROR | universal:handle_message:295 - not enough values to unpack (expected 2, got 1) Traceback (most recent call last):
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\bot.py", line 54, in
loop.run_until_complete(asyncio.gather(*bots))
│ │ │ │ └ [<Task pending name='Task-2' coro=<start_task() running at C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs...
│ │ │ └ <function gather at 0x0000028EDC0FFD80>
│ │ └ <module 'asyncio' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\pytho...
│ └ <function BaseEventLoop.run_until_complete at 0x0000028EDC128C20>
└
File "asyncio\base_events.py", line 640, in run_until_complete sock.setblocking(False)
File "asyncio\windows_events.py", line 321, in run_forever
File "asyncio\base_events.py", line 607, in run_forever sock.close()
File "asyncio\base_events.py", line 1922, in _run_once
File "asyncio\events.py", line 80, in _run self._loop = loop │ └ <member '_loop' of 'Handle' objects> └ <Handle <TaskStepMethWrapper object at 0x0000028EE5E7FDC0>()>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\platforms\onebotbot.py", line 151, in await handle_message( └ <function handle_message at 0x0000028EE58F8680>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 294, in create conversation = ConversationContext(_type, self.session_id) │ │ │ └ 'friend-2843224266' │ │ └ <conversation.ConversationHandler object at 0x0000028EE5938490> │ └ 'chatgpt-api' └ <class 'conversation.ConversationContext'>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 92, in init self.adapter = ChatGPTAPIAdapter(self.session_id) │ │ │ └ 'friend-2843224266' │ │ └ <conversation.ConversationContext object at 0x0000028EE5A32490> │ └ <class 'adapter.chatgpt.api.ChatGPTAPIAdapter'> └ <conversation.ConversationContext object at 0x0000028EE5A32490>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\chatgpt\api.py", line 29, in init self.bot = OpenAIChatbot( │ │ └ <class 'revChatGPT.V3.Chatbot'> │ └ None └ <adapter.chatgpt.api.ChatGPTAPIAdapter object at 0x0000028EE5A38D50>
File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 97, in init if self.get_token_count("default") > self.max_tokens: │ │ │ └ 4000 │ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE5A39A50> │ └ <function Chatbot.get_token_count at 0x0000028EE53E2660> └ <revChatGPT.V3.Chatbot object at 0x0000028EE5A39A50> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\revChatGPT\V3.py", line 142, in get_token_count encoding = tiktoken.encoding_for_model(self.engine) │ │ │ └ 'gpt-3.5-turbo' │ │ └ <revChatGPT.V3.Chatbot object at 0x0000028EE5A39A50> │ └ <function encoding_for_model at 0x0000028EE53E25C0> └ <module 'tiktoken' from 'C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib... File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\model.py", line 75, in encoding_for_model return get_encoding(encoding_name) │ └ 'cl100k_base' └ <function get_encoding at 0x0000028EE53E28E0> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\registry.py", line 63, in get_encoding enc = Encoding(**constructor()) │ └ <function cl100k_base at 0x0000028EE5912480> └ <class 'tiktoken.core.Encoding'> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken_ext\openai_public.py", line 64, in cl100k_base mergeable_ranks = load_tiktoken_bpe( └ <function load_tiktoken_bpe at 0x0000028EE59122A0> File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 117, in load_tiktoken_bpe return { File "C:\Users\Administrator\Downloads\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\tiktoken\load.py", line 119, in
for token, rank in (line.split() for line in contents.splitlines() if line)
│ └ b'64364'
└ b'LWNu'
ValueError: not enough values to unpack (expected 2, got 1) 2023-07-29 13:40:46.368 | DEBUG | platforms.onebot_bot:respond:112 - [OneBot] 尝试发送消息:出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见 。 原因:not enough values to unpack (expected 2, got 1)