Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in write_gif #359

Closed
virtualritz opened this issue Dec 5, 2016 · 5 comments
Closed

Bug in write_gif #359

virtualritz opened this issue Dec 5, 2016 · 5 comments
Labels
bug Issues that report (apparent) bugs.

Comments

@virtualritz
Copy link

The opt parameter, which steers the selection of the palette quantization method for imageio, is erroneously passed to write_gif_with_tempfiles and in there being forwarded to the -layers parameter of ImageMagick's convert tool, causing the latter to fail:

[MoviePy] Building file EYED0229/00002532_00002729.gif
----------------------------------------
[MoviePy] Generating GIF frames...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 59/59 [00:36<00:00,  1.60it/s]
[MoviePy] Optimizing GIF with ImageMagick...
[MoviePy] Running:
>>> convert -delay 3 -dispose 1 -loop 0 EYED0229/00002532_00002729_GIFTEMP*.png -coalesce -layers wu -fuzz 00% -colors 256 EYED0229/00002532_00002729.gif
[MoviePy] This command returned an error !Traceback (most recent call last):
  File "/Users/moeller/code/makegifs.py", line 49, in <module>
    clip.subclip(start, end).write_gif(file_name, program='ImageMagick', tempfiles=True, verbose=True, colors=256, fuzz=0 )
  File "<decorator-gen-56>", line 2, in write_gif
  File "/Library/Python/2.7/site-packages/moviepy-0.2.2.11-py2.7.egg/moviepy/decorators.py", line 54, in requires_duration
    return f(clip, *a, **k)
  File "<decorator-gen-55>", line 2, in write_gif
  File "/Library/Python/2.7/site-packages/moviepy-0.2.2.11-py2.7.egg/moviepy/decorators.py", line 22, in convert_masks_to_RGB
    return f(clip, *a, **k)
  File "/Library/Python/2.7/site-packages/moviepy-0.2.2.11-py2.7.egg/moviepy/video/VideoClip.py", line 468, in write_gif
    loop=loop, dispose=dispose, colors=colors)
  File "<decorator-gen-10>", line 2, in write_gif_with_tempfiles
  File "/Library/Python/2.7/site-packages/moviepy-0.2.2.11-py2.7.egg/moviepy/decorators.py", line 54, in requires_duration
    return f(clip, *a, **k)
  File "<decorator-gen-9>", line 2, in write_gif_with_tempfiles
  File "/Library/Python/2.7/site-packages/moviepy-0.2.2.11-py2.7.egg/moviepy/decorators.py", line 137, in use_clip_fps_by_default
    return f(clip, *new_a, **new_kw)
  File "/Library/Python/2.7/site-packages/moviepy-0.2.2.11-py2.7.egg/moviepy/video/io/gif_writers.py", line 94, in write_gif_with_tempfiles
    raise IOError(error)
IOError: MoviePy Error: creation of EYED0229/00002532_00002729.gif failed because of the following error:

convert: UnrecognizedLayerMethod `wu' @ error/convert.c/ConvertImageCommand/1962.
.

.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py.

@mehmetkose
Copy link

+1

@keikoro keikoro added the bug Issues that report (apparent) bugs. label Feb 17, 2017
@ghost
Copy link

ghost commented Mar 7, 2017

pull request #471 should fix this issue.

@ghost
Copy link

ghost commented Mar 13, 2017

this has been fixed in the repo.

@ghost ghost closed this as completed Mar 13, 2017
@ashbeats
Copy link

Is the PIP repo updated?

@ghost
Copy link

ghost commented Mar 15, 2017

I think it has been 2 or 3 weeks since it has been updated.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs.
Projects
None yet
Development

No branches or pull requests

4 participants