frames = [frame.copy() for frame in ImageSequence.all_frames(img)]
File "/usr/local/lib/python3.10/site-packages/PIL/ImageSequence.py", line 73, in all_frames
ims += [im_frame.copy() for im_frame in Iterator(imSequence)]
File "/usr/local/lib/python3.10/site-packages/PIL/ImageSequence.py", line 73, in <listcomp>
ims += [im_frame.copy() for im_frame in Iterator(imSequence)]
File "/usr/local/lib/python3.10/site-packages/PIL/ImageSequence.py", line 50, in __next__
self.im.seek(self.position)
File "/usr/local/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 151, in seek
self._seek(f)
File "/usr/local/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 367, in _seek
self.dispose = Image.core.fill(dispose_mode, dispose_size, color)
TypeError: color must be int, or tuple of one, three or four elements