cc004 / pcrjjc2

本插件是pcrjjc插件的重置版,可以独立于后端api运行
GNU Affero General Public License v3.0
157 stars 51 forks source link

详细查询失败,显示超时错误好像 #135

Closed nianyu1 closed 6 months ago

nianyu1 commented 7 months ago

报错如下:[2024-05-01 10:14:44,396] INFO in init: 开始生成竞技场查询图片... [2024-05-01 10:14:44,418] ERROR in msghandler: <class 'RuntimeError'> occured when wrapper handling message -1521773518. [2024-05-01 10:14:44,418] ERROR in msghandler: no running event loop Traceback (most recent call last): File "C:\Users\Administrator\Desktop\HosinoBot\HoshinoBot\hoshino\msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "C:\Users\Administrator\Desktop\HosinoBot\HoshinoBot\hoshino\modules\pcrjjc2\safeservice.py", line 25, in wrapper return await func(*args, kwargs) File "C:\Users\Administrator\Desktop\HosinoBot\HoshinoBot\hoshino\modules\pcrjjc2__init__.py", line 387, in on_query_arena_all result_image = await generate_info_pic(res, uid) File "C:\Users\Administrator\Desktop\HosinoBot\HoshinoBot\hoshino\modules\pcrjjc2\create_img.py", line 265, in generate_info_pic return await run_sync_func(_generate_info_pic_internal, *args, *kwargs) File "C:\Users\Administrator\Desktop\HosinoBot\HoshinoBot\hoshino\aiorequests.py", line 10, in run_sync_func return await asyncio.get_event_loop().run_in_executor( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "C:\Users\Administrator\Desktop\HosinoBot\HoshinoBot\hoshino\modules\pcrjjc2\create_img.py", line 50, in _generate_info_pic_internal pic_dir = chara.fromid(id_favorite).icon.path File "C:\Users\Administrator\Desktop\HosinoBot\HoshinoBot\hoshino\modules\priconne\chara.py", line 159, in icon loop = asyncio.get_running_loop() RuntimeError: no running event loop

cc004 commented 7 months ago

你需要在使用图片生成前保证角色图片已经被下载,否则会触发hoshino的坑 https://github.com/Ice9Coffee/HoshinoBot/blob/97543d2a458aacc7876068c8089c990e965f1799/hoshino/modules/priconne/chara.py#L159

nianyu1 commented 7 months ago

好吧

nianyu1 commented 7 months ago

那我应该如何修改呢

nianyu1 commented 7 months ago

image

nianyu1 commented 7 months ago

下不全好像

cc004 commented 7 months ago

试一下get_icon_fix分支的

nianyu1 commented 7 months ago

我试试

nianyu1 commented 7 months ago

这个分支我咋没找到呢😂

nianyu1 commented 7 months ago

okok,我找到了,谢谢冲冲大佬