chingkingm / Hoshinobot-plugin-petpet

HoshinoBot module for making fun pictures
MIT License
20 stars 9 forks source link

Download Fail and Bug/下载失败 #29

Open kcn3388 opened 2 years ago

kcn3388 commented 2 years ago
  1. jsdelivr不稳定,经常性抽风,希望可以换源 ~~ 2. 使用万能表情时,报错:~~ fixed by update emoji: pip install emoji --upgrade
fixed ``` [2022-07-14 17:23:27,064 头像表情包] ERROR: occured when gen_image handling message -69795279. [2022-07-14 17:23:27,064 头像表情包] ERROR: ServiceFunc of HoshinoBot finished. Traceback (most recent call last): File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/__init__.py", line 126, in gen_image im = await make_image(com, sender, users, args=args) File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/data_source.py", line 93, in make_image return await command.func(users, sender=sender, args=args) File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/functions.py", line 96, in universal return await make_jpg_or_gif(img, make) File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/utils.py", line 334, in make_jpg_or_gif return save_jpg(await func(img)) File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/functions.py", line 87, in make await text_frame(a, min_fontsize) File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/functions.py", line 81, in text_frame await draw_text( File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/utils.py", line 62, in draw_text if all([char not in UNICODE_EMOJI["en"] for char in text]): File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/utils.py", line 62, in if all([char not in UNICODE_EMOJI["en"] for char in text]): KeyError: 'en' ```
kcn3388 commented 2 years ago

fix KeyError: 'en',升级emoji包即可 仍然希望可以增加非jsdelivr的静态文件分流