戳一戳响应报错 'PokeNotifyEvent' object has no attribute 'message_id'
simpleYOTO opened this issue · comments
进行戳一戳后不会发生图片并报错,恳请大佬指导
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_pixivbot_onebot
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_pixivbot_onebot_
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_pixivbot_onebot_
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_pixivbot_onebot_
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_pixivbot_onebot_
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_pixivbot_onebot
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_pixivbot_onebot_
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_pixivbot_onebot_
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](https://private-user-images.githubusercontent.com/107185219/248526526-b0b2d45c-b164-4785-8b67-f3e6d3c90809.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0MjIzNTUsIm5iZiI6MTcyNDQyMjA1NSwicGF0aCI6Ii8xMDcxODUyMTkvMjQ4NTI2NTI2LWIwYjJkNDVjLWIxNjQtNDc4NS04YjY3LWYzZTZkM2M5MDgwOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyM1QxNDA3MzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YzljZmZhOWEzM2UwYmE1YWM5MGQwY2JmZjk5OTA3NzljOGI2NDUyOGQyOTA0NmJhMWEyMjA0NTIwMDYxZmIxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.OJDBcYJNodVwSPXBsDuOk_qawDfpIaymaAhS2p3Qiaw)
旧版(2.0.0之前)确实存在这个问题
新版(2.0.0及之后)这个问题是上游插件saa不支持戳一戳导致的
felinae98/nonebot-plugin-send-anything-anywhere#58 (comment)
得等这个PR合并,或者急的话直接把这个分支clone下来装上()