Ailitonia / omega-miya

基于 nonebot2 的多平台机器人
MIT License
272 stars 50 forks source link

群青表情包模板收到gif图时制作失败 #96

Closed ShianoQwQ closed 2 years ago

ShianoQwQ commented 2 years ago

提示“表情包制作失败了QAQ, 发生了意外的错误, 请稍后再试”,而不是像别的模板转成了静态图。

使用的7f8b68e

ShianoQwQ commented 2 years ago

补充一个日志


06-18 11:43:02 [ERROR] omega_miya | Decorator RunAsyncCatchingException | omega_miya.plugins.sticker_maker.model.make raise Exception ValueError > There are something wrong(s) in function running
Traceback (most recent call last):
  File "/home/shiano/omega-miya/omega_miya/plugins/sticker_maker/__init__.py", line 141, in handle_sticker
    sticker_result = await run_async_catching_exception(sticker_render(text=text, source_image=source_image).make)()
> File "/home/shiano/omega-miya/omega_miya/utils/process_utils/__init__.py", line 128, in _wrapper
    result = await func(*args, **kwargs)
  File "/home/shiano/omega-miya/omega_miya/plugins/sticker_maker/model.py", line 127, in make
    image_content = await run_sync(self._handler)()
  File "/home/shiano/omega-miya/omega_miya/utils/process_utils/__init__.py", line 84, in _wrapper
    return await loop.run_in_executor(None, p_func)
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/shiano/omega-miya/omega_miya/plugins/sticker_maker/render.py", line 584, in _handler
    made_image = ImageEnhance.Color(image).enhance(0)
  File "/home/shiano/bot/lib/python3.10/site-packages/PIL/ImageEnhance.py", line 36, in enhance
    return Image.blend(self.degenerate, self.image, factor)
  File "/home/shiano/bot/lib/python3.10/site-packages/PIL/Image.py", line 3167, in blend
    return im1._new(core.blend(im1.im, im2.im, alpha))
ValueError: image has wrong mode
06-18 11:43:02 [ERROR] omega_miya | StickerMaker | 制作表情包失败, image has wrong mode```
Ailitonia commented 2 years ago

周末有空来修😂

Ailitonia commented 2 years ago

Fixed in ac134f77f6d54050c5c739d88471d8175ca7237a