hoshino_xcw icon indicating copy to clipboard operation
hoshino_xcw copied to clipboard

内鬼生成报错

Open Zoe-Wh1t3zZ opened this issue 3 years ago • 1 comments

File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\snitchgenerator_init_.py", line 5, in from .nokia import generate_image File "C:\Users\Administrator\Desktop\HoshinoBot\hoshino\modules\snitchgenerator\nokia.py", line 21, in font = ImageFont.truetype("fonts/1.ttf", font_size) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\ImageFont.py", line 844, in truetype return freetype(font) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\ImageFont.py", line 841, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\ImageFont.py", line 193, in init self.font = core.getfont( OSError: cannot open resource

Zoe-Wh1t3zZ avatar Jan 30 '22 13:01 Zoe-Wh1t3zZ

做如下修改:

import os
...

path = os.path.join(os.path.dirname(__file__), "./fonts/1.ttf")
...

kcn3388 avatar Jul 15 '22 08:07 kcn3388