Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../.venv/Lib/site-packages/PIL/Image.py", line 2413, in save
save_handler(self, fp, filename)
File ".../.venv/Lib/site-packages/PIL/PngImagePlugin.py", line 1218, in _save_all
_save(im, fp, filename, save_all=True)
File ".../.venv/Lib/site-packages/PIL/PngImagePlugin.py", line 1241, in _save
mode = modes.pop()
^^^^^^^^^^^
KeyError: 'pop from an empty set'
num_plays.pngis in https://github.com/python-pillow/Pillow/tree/main/Tests/images/apng.This error doesn't occur without
save_all=True, but then it doesn't save all frames. Saving as a GIF works.