I'm trying to create a GIF file using images2fig.py from the visvis package
With this very simple code:
import glob
from PIL import Image
from visvis.vvmovie.images2gif import writeGif
images = [Image.open(image) for image in glob.glob("*.png")]
filename = "test.gif"
writeGif(filename, images, duration=0.2)
I got an error
File "C:\Python27\lib\site-packages\visvis\vvmovie\images2gif.py", line 575, in writeGif
gifWriter.writeGifToFile(fp, images, duration, loops, xy, dispose)
File "C:\Python27\lib\site-packages\visvis\vvmovie\images2gif.py", line 436, in writeGifToFile
fp.write(globalPalette)
TypeError: must be string or buffer, not list
How do I fix this?
I'm using Python 2.7.5, Pillow 2.1.0, numpy 1.7.1-2, all are standard installation from Python(x,y) 2.7.5 on Windows, and visvis 1.8 which is the latest version. I tried to reinstall the packages but it did not help. I still get the same error. A friend of mine reproduced the error on his computer too.
help(writeGif)to learn about the particular version of the function you are running.PILLOW_VERSION = '2.1.0' VERSION = '1.1.7', seems like it's updated properly. How can I reinstall the packages usingpipon Windows? Worth a try.pipon windows then runpip install PIL visvis. That might get it working.