6vision/Apilot

以cow-win部署后,载入插件后,其他功能都正常,唯独【摸鱼日报】报错,请大神帮忙,谢谢

namas0312 opened this issue · 0 comments

触发关键字:早报,天气等都是正常发送接收的,唯独摸鱼日报无法触发,现象就是发送【摸鱼】后无回复,log中有报错信息,如下:

[ERROR][2024-07-25 11:05:42][chat_channel.py:371] - [WX] sendMsg error: cannot write mode RGBA as JPEG
[ERROR][2024-07-25 11:05:42][chat_channel.py:374] - cannot write mode RGBA as JPEG
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\JpegImagePlugin.py", line 639, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'

`The above exception was the direct cause of the following exception:

`Traceback (most recent call last):
File "D:\chatgpt-on-wechat-win\channel\chat_channel.py", line 369, in _send
self.send(reply, context)
File "D:\chatgpt-on-wechat-win\channel\wechatnt\ntchat_channel.py", line 274, in send
image_path = download_and_compress_image(img_url, filename)
File "D:\chatgpt-on-wechat-win\channel\wechatnt\ntchat_channel.py", line 34, in download_and_compress_image
image.save(image_path, "JPEG", quality=quality)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\Image.py", line 2568, in save
save_handler(self, fp, filename)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\JpegImagePlugin.py", line 642, in _save
raise OSError(msg) from e
OSError: cannot write mode RGBA as JPEG

才疏学浅,用chatgpt分析了一下,好像说是格式问题,但不知如何下手,麻烦大佬协助,谢谢