Closed MomentQYC closed 1 year ago
ntr时没有输出信息,在日志里发现如下信息
Running Matcher(type='message', module=nonebot_plugin_groupmate_waifu) failed. Traceback (most recent call last): File "<string>", line 17, in <module> File "/usr/local/lib/python3.10/dist-packages/nonebot/__init__.py", line 273, in run get_driver().run(*args, **kwargs) │ │ └ {} │ └ () └ <function get_driver at 0x7f6646655ea0> File "/usr/local/lib/python3.10/dist-packages/nonebot/drivers/fastapi.py", line 172, in run uvicorn.run( │ └ <function run at 0x7f6645e2fd90> └ <module 'uvicorn' from '/usr/local/lib/python3.10/dist-packages/uvicorn/__init__.py'> File "/usr/local/lib/python3.10/dist-packages/uvicorn/main.py", line 569, in run server.run() │ └ <function Server.run at 0x7f6645e481f0> └ <uvicorn.server.Server object at 0x7f6644ea33d0> File "/usr/local/lib/python3.10/dist-packages/uvicorn/server.py", line 60, in run return asyncio.run(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ <function Server.serve at 0x7f6645e48280> │ │ └ <uvicorn.server.Server object at 0x7f6644ea33d0> │ └ <function run at 0x7f66477cb9a0> └ <module 'asyncio' from '/usr/lib/python3.10/asyncio/__init__.py'> File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) │ │ └ <coroutine object Server.serve at 0x7f66252575a0> │ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects> └ <uvloop.Loop running=True closed=False debug=False> File "/usr/local/lib/python3.10/dist-packages/nonebot/message.py", line 142, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache) │ │ │ │ │ │ └ {<function matcher_mutex at 0x7f6644ebc940>: <Task finished name='Task-2259286' coro=<AsyncExitStack.enter_async_context() do... │ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f6623c36140> │ │ │ │ └ {'_prefix': {'command': ('娶群友',), 'raw_command': '娶群友', 'command_arg': [MessageSegment(type='at', data={'qq': '隐藏'}),... │ │ │ └ GroupMessageEvent(time=1675480686, self_id=隐藏, post_type='message', sub_type='normal', user_id=隐藏, message_ty... │ │ └ Bot(type='OneBot V11', self_id='隐藏') │ └ Matcher(type='message', module=nonebot_plugin_groupmate_waifu) └ <function _run_matcher at 0x7f66463ae320> > File "/usr/local/lib/python3.10/dist-packages/nonebot/message.py", line 188, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) │ │ │ │ │ │ └ {<function matcher_mutex at 0x7f6644ebc940>: <Task finished name='Task-2259286' coro=<AsyncExitStack.enter_async_context() do... │ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f6623c36140> │ │ │ │ └ {'_prefix': {'command': ('娶群友',), 'raw_command': '娶群友', 'command_arg': [MessageSegment(type='at', data={'qq': '隐藏'}),... │ │ │ └ GroupMessageEvent(time=1675480686, self_id=隐藏, post_type='message', sub_type='normal', user_id=隐藏, message_ty... │ │ └ Bot(type='OneBot V11', self_id='隐藏') │ └ <function Matcher.run at 0x7f664669dea0> └ Matcher(type='message', module=nonebot_plugin_groupmate_waifu) File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/matcher/matcher.py", line 727, in run await self.simple_run(bot, event, state, stack, dependency_cache) │ │ │ │ │ │ └ {<function matcher_mutex at 0x7f6644ebc940>: <Task finished name='Task-2259286' coro=<AsyncExitStack.enter_async_context() do... │ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f6623c36140> │ │ │ │ └ {'_prefix': {'command': ('娶群友',), 'raw_command': '娶群友', 'command_arg': [MessageSegment(type='at', data={'qq': '隐藏'}),... │ │ │ └ GroupMessageEvent(time=1675480686, self_id=隐藏, post_type='message', sub_type='normal', user_id=隐藏, message_ty... │ │ └ Bot(type='OneBot V11', self_id='隐藏') │ └ <function Matcher.simple_run at 0x7f664669de10> └ Matcher(type='message', module=nonebot_plugin_groupmate_waifu) File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/matcher/matcher.py", line 702, in simple_run await handler( └ Dependent(call=_) File "/usr/local/lib/python3.10/dist-packages/nonebot/dependencies/__init__.py", line 108, in __call__ return await cast(Callable[..., Awaitable[R]], self.call)(**values) │ │ │ │ │ │ └ {'bot': Bot(type='OneBot V11', self_id='隐藏'), 'event': GroupMessageEvent(time=1675480686, self_id=隐藏, post_ty... │ │ │ │ │ └ <function _ at 0x7f6625224f70> │ │ │ │ └ Dependent(call=_) │ │ │ └ ~R │ │ └ typing.Awaitable │ └ typing.Callable └ <function cast at 0x7f664784b6d0> File "/usr/local/lib/python3.10/dist-packages/nonebot_plugin_groupmate_waifu/__init__.py", line 137, in _ "ta的CP:" + ( member['card'] or member['nickname'] ), UnboundLocalError: local variable 'member' referenced before assignment
Python 3.10 Ubuntu 22.04
已更新
ntr时没有输出信息,在日志里发现如下信息