You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/root/.local/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
ret =await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/strawberry-py/modules/fun/fun/module.py", line 437, in lickwith BytesIO() as image_binary:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PIL/Image.py", line 2605, in save
save_handler(self, fp, filename)
File "/usr/local/lib/python3.12/site-packages/PIL/GifImagePlugin.py", line 774, in _save_all
_save(im, fp, filename, save_all=True)
File "/usr/local/lib/python3.12/site-packages/PIL/GifImagePlugin.py", line 787, in _saveifnot save_all ornot _write_multiple_frames(im, fp, palette):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PIL/GifImagePlugin.py", line 700, in _write_multiple_frames
background_im.putpalette(im_frames[0].im.palette)
File "/usr/local/lib/python3.12/site-packages/PIL/Image.py", line 2103, in putpaletteself.load() # install new palette^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PIL/Image.py", line 909, in loadself.im.putpalette(self.palette.mode, mode, arr)
ValueError: invalid palette size
This happens only on Pillow 11.0.0 with disposal=2.
What are your OS, Python and Pillow versions?
OS: Windows 11 / Ubuntu 24.04.1 LTS
Python: 3.12
Pillow: 11.0.0
--------------------------------------------------------------------
Pillow 11.0.0
Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)]
--------------------------------------------------------------------
Python executable is C:\Program Files\Python312\python.exe
System Python files loaded from C:\Program Files\Python312
--------------------------------------------------------------------
Python Pillow modules loaded from C:\Program Files\Python312\Lib\site-packages\PIL
Binary Pillow modules loaded from C:\Program Files\Python312\Lib\site-packages\PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 11.0.0
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.13.3
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.4.0
--- JPEG support ok, compiled for libjpeg-turbo 3.0.4
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.1
--- LIBTIFF support ok, loaded 4.6.0
*** RAQM (Bidirectional Text) support not installed
*** LIBIMAGEQUANT (Quantization method) support not installed
*** XCB (X protocol) support not installed
--------------------------------------------------------------------
What did you do?
I'm saving a GIF created from series of PNG.
What did you expect to happen?
The GIF is created.
What actually happened?
This happens only on Pillow 11.0.0 with disposal=2.
What are your OS, Python and Pillow versions?
https://github.com/strawberry-py/strawberry-fun/blob/main/fun/module.py#L437
The error happens only on 11.0.0 verison, previous 10.4.0 works fine.
I assume it might be related to #8366
The text was updated successfully, but these errors were encountered: