File "asyncio\tasks.py", line 479, in wait_for
for f in todo:
File "C:\Users\Liu\Desktop\gpt\chatgpt\universal.py", line 222, in request
async for rendered in task:
└ <async_generator object retry..decorator..wrapper at 0x000002C7552CCFB0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\utils\retry.py", line 21, in wrapper
async for result in func(*args, **kwargs):
│ │ └ {'prompt': '你谁', 'chain': MessageChain([Plain(text='Unsupported')]), 'name': '港岛妹夫'}
│ └ (<conversation.ConversationContext object at 0x000002C7553ADCD0>,)
└ <function ConversationContext.ask at 0x000002C755307EC0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\conversation.py", line 187, in ask
async for item in self.adapter.ask(prompt):
│ │ │ └ '你谁'
│ │ └ <function YiyanAdapter.ask at 0x000002C755171C60>
│ └ <adapter.baidu.yiyan.YiyanAdapter object at 0x000002C7553ADD50>
└ <conversation.ConversationContext object at 0x000002C7553ADCD0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\adapter\baidu\yiyan.py", line 126, in ask
self.__check_response(req.json())
│ │ └ <function Response.json at 0x000002C7527B4D60>
│ └ <Response [200 OK]>
└ <adapter.baidu.yiyan.YiyanAdapter object at 0x000002C7553ADD50>
File "C:\Users\Liu\Desktop\gpt\chatgpt\adapter\baidu\yiyan.py", line 182, in __check_response
raise Exception(resp['msg'])
└ {'code': 40005, 'msg': '用户访问被限制', 'data': None, 'logId': '118000002296985164'}
提交 issue 前,请先确认:
表现
描述 BUG 的表现情况
运行环境:
复现步骤
日志 [2023-05-23 20:31:06,117] 127.0.0.1:9336 GET /ws 1.1 101 - 0 2023-05-23 20:32:05.096 | DEBUG | platforms.onebotbot::181 - 群聊消息:[CQ:at,qq=1650706324] 你谁 2023-05-23 20:32:05.128 | DEBUG | middlewares.concurrentlock:handle_request:40 - [Concurrent] 排队中,前面还有 0 个人! 2023-05-23 20:32:05.128 | DEBUG | middlewares.concurrentlock:handle_request:42 - [Concurrent] 排到了! 2023-05-23 20:32:05.128 | DEBUG | middlewares.timeout:create_timeout_task:55 - [Timeout] 开始计时…… 2023-05-23 20:32:07.866 | ERROR | universal:handle_message:295 - 用户访问被限制 Traceback (most recent call last):
File "C:\Users\Liu\Desktop\gpt\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\Liu\Desktop\gpt\chatgpt\platforms\onebot_bot.py:356> wait...
│ │ │ └ <function gather at 0x000002C750EF2520>
│ │ └ <module 'asyncio' from 'C:\Users\Liu\Desktop\gpt\python3.11\python311.zip\asyncio\init.pyc'>
│ └ <function BaseEventLoop.run_until_complete at 0x000002C750F13380>
└
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 Task.task_wakeup()>
File "C:\Users\Liu\Desktop\gpt\chatgpt\platforms\onebotbot.py", line 183, in await handle_message( └ <function handle_message at 0x000002C7551727A0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x000002C75533BEC0>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x000002C75533B9C0>
│ │ │ └ '你谁'
│ │ └ 'group-787020629'
│ └ <function MiddlewareConcurrentLock.handle_request at 0x000002C7553391C0>
└ <middlewares.concurrentlock.MiddlewareConcurrentLock object at 0x000002C755335310>
File "C:\Users\Liu\Desktop\gpt\chatgpt\middlewares\concurrentlock.py", line 43, in handle_request await action(session_id, prompt, conversation_context, respond) │ │ │ │ └ <function handle_message..respond at 0x000002C75533B9C0>
│ │ │ └ None
│ │ └ '你谁'
│ └ 'group-787020629'
└ <function handle_message..wrap_request..call at 0x000002C75533BEC0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x000002C75533BE20>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x000002C75533B9C0>
│ │ │ └ '你谁'
│ │ └ 'group-787020629'
│ └ <function Middleware.handle_request at 0x000002C755338680>
└ <middlewares.baiducloud.MiddlewareBaiduCloud object at 0x000002C755335390>
File "C:\Users\Liu\Desktop\gpt\chatgpt\middlewares\middleware.py", line 9, in handle_request await action(session_id, prompt, conversation_context, respond) │ │ │ │ └ <function handle_message..respond at 0x000002C75533B9C0>
│ │ │ └ None
│ │ └ '你谁'
│ └ 'group-787020629'
└ <function handle_message..wrap_request..call at 0x000002C75533BE20>
File "C:\Users\Liu\Desktop\gpt\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x000002C75533BD80>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x000002C75533B9C0>
│ │ │ └ '你谁'
│ │ └ 'group-787020629'
│ └ <function MiddlewareRatelimit.handle_request at 0x000002C754AC1300>
└ <middlewares.ratelimit.MiddlewareRatelimit object at 0x000002C755335350>
File "C:\Users\Liu\Desktop\gpt\chatgpt\middlewares\ratelimit.py", line 23, in handle_request await action(session_id, prompt, conversation_context, respond) │ │ │ │ └ <function handle_message..respond at 0x000002C75533B9C0>
│ │ │ └ None
│ │ └ '你谁'
│ └ 'group-787020629'
└ <function handle_message..wrap_request..call at 0x000002C75533BD80>
File "C:\Users\Liu\Desktop\gpt\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..request at 0x000002C75533BA60>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x000002C75533B9C0>
│ │ │ └ '你谁'
│ │ └ 'group-787020629'
│ └ <function MiddlewareTimeout.handle_request at 0x000002C755339260>
└ <middlewares.timeout.MiddlewareTimeout object at 0x000002C7542F9590>
File "C:\Users\Liu\Desktop\gpt\chatgpt\middlewares\timeout.py", line 27, in handle_request await asyncio.wait_for(coro_task, config.response.max_timeout) │ │ │ │ │ └ 600.0 │ │ │ │ └ Response(mode='mixed', buffer_delay=15, default_ai='yiyan', error_format='出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或 者发送 “回滚对话” 来回... │ │ │ └ Config(onebot=Onebot(qq=1650706324, manager_qq=939688743, reverse_ws_host='0.0.0.0', reverse_ws_port=8566), mirai=None, teleg... │ │ └ <Task finished name='Task-36' coro=<handle_message..request() done, defined at C:\Users\Liu\Desktop\gpt\chatgpt\unive...
│ └ <function wait_for at 0x000002C750EF1F80>
└ <module 'asyncio' from 'C:\Users\Liu\Desktop\gpt\python3.11\python311.zip\asyncio\init.pyc'>
File "asyncio\tasks.py", line 479, in wait_for for f in todo:
File "C:\Users\Liu\Desktop\gpt\chatgpt\universal.py", line 222, in request async for rendered in task: └ <async_generator object retry..decorator..wrapper at 0x000002C7552CCFB0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\utils\retry.py", line 21, in wrapper async for result in func(*args, **kwargs): │ │ └ {'prompt': '你谁', 'chain': MessageChain([Plain(text='Unsupported')]), 'name': '港岛妹夫'} │ └ (<conversation.ConversationContext object at 0x000002C7553ADCD0>,) └ <function ConversationContext.ask at 0x000002C755307EC0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\conversation.py", line 187, in ask async for item in self.adapter.ask(prompt): │ │ │ └ '你谁' │ │ └ <function YiyanAdapter.ask at 0x000002C755171C60> │ └ <adapter.baidu.yiyan.YiyanAdapter object at 0x000002C7553ADD50> └ <conversation.ConversationContext object at 0x000002C7553ADCD0>
File "C:\Users\Liu\Desktop\gpt\chatgpt\adapter\baidu\yiyan.py", line 126, in ask self.__check_response(req.json()) │ │ └ <function Response.json at 0x000002C7527B4D60> │ └ <Response [200 OK]> └ <adapter.baidu.yiyan.YiyanAdapter object at 0x000002C7553ADD50>
File "C:\Users\Liu\Desktop\gpt\chatgpt\adapter\baidu\yiyan.py", line 182, in __check_response raise Exception(resp['msg']) └ {'code': 40005, 'msg': '用户访问被限制', 'data': None, 'logId': '118000002296985164'}
Exception: 用户访问被限制