python - Error when creating GIF using images2gif.py -


i'm trying create gif file using images2fig.py visvis package

with simple code:

import glob pil import image visvis.vvmovie.images2gif import writegif  images = [image.open(image) image in glob.glob("*.png")] filename = "test.gif" writegif(filename, images, duration=0.2) 

i got 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 string or buffer, not list 

how fix this?

i'm using python 2.7.5, pillow 2.1.0, numpy 1.7.1-2, standard installation python(x,y) 2.7.5 on windows, , visvis 1.8 latest version. tried reinstall packages did not help. still same error. friend of mine reproduced error on computer too.

@korylprince fixed problem following 2 changes:

  1. i uninstalled python(x,y), installed anaconda (32-bit), installed visvis via pip.

  2. instead of pil image, use imread(image), load image numpy array.

on computer did not uninstall python(x,y), instead uninstalled pillow 2.1.0 , installed pil 1.1.7, , replaced code same step 2 above. in way worked python(x,y). problem pillow 2.1.0.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -