Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
namas0312 opened this issue Jul 25, 2024 · 0 comments

Comments

@namas0312
Copy link

namas0312 commented Jul 25, 2024

触发关键字:早报,天气等都是正常发送接收的,唯独摸鱼日报无法触发,现象就是发送【摸鱼】后无回复,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分析了一下,好像说是格式问题,但不知如何下手,麻烦大佬协助,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant