Yuri-YuzuChaN / maimaiDX

基于HoshinoBot V2的舞萌DX查询插件,移植自mai-bot开源项目
MIT License
198 stars 32 forks source link

今天更新了2023的版本,重新装了更新后的文件 指令无法触发 #69

Closed Kanade1551 closed 1 year ago

Kanade1551 commented 1 year ago

[2023-06-09 16:58:20,777 maimaiDX] INFO: Message 1965609109 triggered best_50. [2023-06-09 16:58:22,798 maimaiDX] ERROR: <class 'FileNotFoundError'> occured when best_50 handling message 1965609109. [2023-06-09 16:58:22,798 maimaiDX] ERROR: [Errno 2] No such file or directory: 'C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\static\mai\pic\b40_score_basic.png' Traceback (most recent call last): File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\msghandler.py", line 23, in handle_message await service_func.func(bot, event) File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\maimai.py", line 537, in best_50 await bot.send(ev, await generate(payload), at_sender=True) File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\libraries\maimai_best_50.py", line 376, in generate pic = await draw_best.draw() File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\libraries\maimai_best_50.py", line 223, in draw basic = Image.open(os.path.join(self.maimai_dir, 'b40_score_basic.png')) File "C:\Users\Administrator\Desktop\maimai\lib\site-packages\PIL\Image.py", line 3068, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\static\mai\pic\b40_score_basic.png' [2023-06-09 16:58:22,814 nonebot] INFO: Message 1965609109 is ignored: Handled by Hoshino 不知道是什么情况 网络应该是没问题(

Yuri-YuzuChaN commented 1 year ago

静态资源全部更换,重新下载

Kanade1551 commented 1 year ago

[2023-06-09 17:13:25,749 maimaiDX] INFO: Message -206361069 triggered best_50. [2023-06-09 17:13:26,362 maimaiDX] ERROR: <class 'FileNotFoundError'> occured when best_50 handling message -206361069. [2023-06-09 17:13:26,362 maimaiDX] ERROR: [Errno 2] No such file or directory: 'C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\static\mai\pic\b40_score_basic.png' Traceback (most recent call last): File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\msghandler.py", line 23, in handle_message await service_func.func(bot, event) File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\maimai.py", line 537, in best_50 await bot.send(ev, await generate(payload), at_sender=True) File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\libraries\maimai_best_50.py", line 376, in generate pic = await draw_best.draw() File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\libraries\maimai_best_50.py", line 223, in draw basic = Image.open(os.path.join(self.maimai_dir, 'b40_score_basic.png')) File "C:\Users\Administrator\Desktop\maimai\lib\site-packages\PIL\Image.py", line 3068, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\static\mai\pic\b40_score_basic.png' [2023-06-09 17:13:26,362 nonebot] INFO: Message -206361069 is ignored: Handled by Hoshino 还是不行,下的静态资源应该是没问题的 最后一首是11509。方便的话能加企鹅我发下图片嘛(

Kanade1551 commented 1 year ago

[2023-06-09 17:16:39,398 maimaiDX] INFO: Message 336266004 triggered dx_help. [2023-06-09 17:16:39,398 maimaiDX] ERROR: <class 'OSError'> occured when dx_help handling message 336266004. [2023-06-09 17:16:39,398 maimaiDX] ERROR: cannot open resource Traceback (most recent call last): File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\msghandler.py", line 23, in handle_message await service_func.func(bot, event) File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\service.py", line 224, in wrapper return await func(bot, event) File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\maimai.py", line 106, in dx_help await bot.send(ev, MessageSegment.image(image_to_base64(text_to_image(sv_help))), at_sender=True) File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\maimaiDX\libraries\image.py", line 27, in text_to_image font = ImageFont.truetype(fontpath, 24) File "C:\Users\Administrator\Desktop\maimai\lib\site-packages\PIL\ImageFont.py", line 878, in truetype return freetype(font) File "C:\Users\Administrator\Desktop\maimai\lib\site-packages\PIL\ImageFont.py", line 875, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "C:\Users\Administrator\Desktop\maimai\lib\site-packages\PIL\ImageFont.py", line 226, in init self.font = core.getfont( OSError: cannot open resource [2023-06-09 17:16:39,414 nonebot] INFO: Message 336266004 is ignored: Handled by Hoshino 这是帮助的报错

Yuri-YuzuChaN commented 1 year ago

你确定你的目录是对的?

Kanade1551 commented 1 year ago

草,搞明白了 确实是目录问题,里面多了层static,打扰了!感谢