Closed yoiyami96 closed 2 years ago
[ERROR] nonebot | Running matcher <Matcher from src.plugins.petpet, type=message, priority=12, temp=False> failed. Traceback (most recent call last): File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 146, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 196, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher.py", line 672, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher.py", line 639, in simple_run await handler( File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\dependencies__init.py", line 89, in call values = await self.solve(**kwargs) File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\dependencies\init__.py", line 191, in solve await param._solve(*params) File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\params.py", line 155, in _solve solved = await task File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\utils.py", line 111, in _wrapper result = await loop.run_in_executor(None, pfunc) File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(self.args, **self.kwargs) File "C:\Users\cyy19\Downloads\software\amiya\bot.\src\plugins\petpet\depends.py", line 72, in dependency raw_msg = event.original_message AttributeError: 'PrivateMessageEvent' object has no attribute 'original_message'
升级 nonebot-adapter-onebot
nonebot-adapter-onebot最新2.1.2不行,换成2.1.1可以了
[ERROR] nonebot | Running matcher <Matcher from src.plugins.petpet, type=message, priority=12, temp=False> failed. Traceback (most recent call last): File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\Scripts\nb.exe__main.py", line 7, in
sys.exit(main())
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, kwargs)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, *kwargs)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\handlers\deploy.py", line 24, in
run_bot
nonebot.run(app=f"{module_name}:{app}")
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot__init__.py", line 261, in run
get_driver().run(args, *kwargs)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\drivers\fastapi.py", line 170, in run
uvicorn.run(
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\main.py", line 463, in run
server.run()
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 633, in run_until_complete
self.run_forever()
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 600, in run_forever
self._run_once()
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1896, in _run_once
handle._run()
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, self._args)
File "C:\Users\cyy19\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 146, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)