lgc-NB2Dev / nonebot-plugin-picstatus

运行状态图片版 for NoneBot2 / A NoneBot2 plugin generates a picture which shows the status of current device
MIT License
119 stars 11 forks source link

报错 #39

Closed gaodeng520 closed 10 months ago

gaodeng520 commented 10 months ago

每次加载运行nonebotv11成功后都会提示

[WARNING] nonebot_plugin_picstatus | Error when getting bot info: ValueError: Event has no context!
01-13 14:57:41 [WARNING] nonebot_plugin_picstatus | Error when getting bot info: ValueError: Event has no context!
01-13 14:57:42 [WARNING] nonebot_plugin_picstatus | Error when getting bot info: ValueError: Event has no context!

但使用没有受到影响

XieXiLin2 commented 10 months ago

上游用的什么框架 Shamrock?

gaodeng520 commented 10 months ago

gocq

lgc2333 commented 10 months ago

https://github.com/lgc-NB2Dev/nonebot-plugin-picstatus/blob/1104c9c6b7baf4d88e0c0ba3d8c5a0e511cf9c27/nonebot_plugin_picstatus/components/header.py#L116-L126

正常报错,nb在刚刚启动时会从事件获取bot信息并缓存,刚好遇到了无法获取到信息的事件