bot-ssttkkl / nonebot-plugin-pixivbot

NoneBot插件,发送随机Pixiv插画、画师更新推送、定时订阅推送……
MIT License
111 stars 2 forks source link

戳一戳响应报错 'PokeNotifyEvent' object has no attribute 'message_id' #188

Closed simpleYOTO closed 1 year ago

simpleYOTO commented 1 year ago

进行戳一戳后不会发生图片并报错,恳请大佬指导 06-25 11:18:38 [ERROR] nonebot | Running Matcher(type='notice', module=nonebot_plugin_pixivbot_onebot_v11.handler.poke) failed. Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\default_error_interceptor.py", line 22, in intercept await wrapped_func(*args, post_dest=post_dest, silently=silently, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\timeout_interceptor.py", line 21, in intercept await wait_for(wrapped_func(*args, post_dest=post_dest, silently=silently, *kwargs), File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for return fut.result() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\retry_interceptor.py", line 32, in intercept raise e File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\retry_interceptor.py", line 26, in intercept return await wrapped_func(args, post_dest=post_dest, silently=silently, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\loading_prompt_interceptor.py", line 33, in intercept await wrapped_func(*args, post_dest=post_dest, silently=silently, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\service_interceptor.py", line 35, in intercept await wrapped_func(*args, post_dest=post_dest, silently=silently, *kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\record_req_interceptor.py", line 20, in intercept await wrapped_func(args, post_dest=post_dest, silently=silently, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \base.py", line 126, in _parse_args_and_actual_handle await self.actual_handle(post_dest=post_dest, silently=silently, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \base.py", line 216, in actual_handle return await self.delegation.actual_handle(post_dest=post_dest, silently=silently, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \common\random_recommended_illust.py", line 52, in actual_handle await self.post_illusts(illusts, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \base.py", line 61, in post_illusts await self.post_illust(illusts[0], header=header, number=number, post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \base.py", line 51, in post_illust await self.postman_manager.send_illusts(model, post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \recorder.py", line 96, in send_illusts await self.delegation.send_illusts(model, post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\protoco l_dep\postman.py", line 31, in send_illusts return await self[post_dest.adapter].send_illusts(model, post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\protocol_dep\postman.py", line 76, in send_illusts await self.send_illust(x, post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\protocol_dep\postman.py", line 69, in send_illust await post_dest.post(message) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\protocol_dep\post_dest.py", line 76, in post await self.post_single(message) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\protocol_dep\post_dest.py", line 80, in post_single message.insert(0, MessageSegment.reply(self.event.message_id)) AttributeError: 'PokeNotifyEvent' object has no attribute 'message_id'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\multiprocessing\spawn.py", line 116, in spawn _main exitcode = _main(fd, parent_sentinel) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\multiprocessing\spawn.py", line 129, in _main

return self._bootstrap(parent_sentinel)

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 315, in _bo otstrap self.run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run

self._target(*self._args, **self._kwargs)

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn_subprocess.py", line 7 6, in subprocess_started target(sockets=sockets) File "C:\Users\Administrator\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\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 633, in run_unt il_complete self.run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 600, in run_for ever self._run_once() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1896, in _run_o nce handle._run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 142, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 188, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matche r.py", line 727, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matche r.py", line 702, in simple_run await handler( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\dependencies__init.p y", line 108, in call__ return await cast(Callable[..., Awaitable[R]], self.call)(*values) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\handler\poke.py", line 47, in on_match await self.handle(post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \base.py", line 95, in handle await self.interceptor.intercept(self._parse_args_and_actual_handle, args, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\combined_interceptor.py", line 56, in intercept await self.x.intercept( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\combined_interceptor.py", line 56, in intercept await self.x.intercept( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\combined_interceptor.py", line 56, in intercept await self.x.intercept( [Previous line repeated 2 more times] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\default_error_interceptor.py", line 35, in intercept await self.post_plain_text(f"内部错误:{type(e)}{e}", post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\handler \interceptor\base.py", line 18, in post_plain_text await self.postman_manager.send_plain_text(message, post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbot\protoco l_dep\postman.py", line 27, in send_plain_text return await self[post_dest.adapter].send_plain_text(message, post_dest=post_dest) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\protocol_dep\postman.py", line 60, in send_plain_text await post_dest.post(message) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\protocol_dep\post_dest.py", line 76, in post await self.post_single(message) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_pixivbotonebot v11\protocol_dep\post_dest.py", line 80, in post_single message.insert(0, MessageSegment.reply(self.event.message_id)) AttributeError: 'PokeNotifyEvent' object has no attribute 'message_id'

1687663706240

1687663644681

ssttkkl commented 1 year ago

旧版(2.0.0之前)确实存在这个问题 新版(2.0.0及之后)这个问题是上游插件saa不支持戳一戳导致的

ssttkkl commented 1 year ago

https://github.com/felinae98/nonebot-plugin-send-anything-anywhere/pull/58#issue-1792864572

ssttkkl commented 1 year ago

felinae98/nonebot-plugin-send-anything-anywhere#58 (comment)

得等这个PR合并,或者急的话直接把这个分支clone下来装上()