Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Better error message if no animation writer is available #5616

Closed
Milestone
@jankatins

Description

@jankatins

You have to set onebefore importing animation:

# Must be set before the animation importmpl.rcParams['animation.ffmpeg_path'] = "C:\\Users\\jschulz\\Dropbox\\Programme\\cmder\\vendor\\jasc\\ffmpeg.exe"import matplotlib.animation as animation

Without:

C:\portabel\miniconda\envs\katins2\lib\site-packages\matplotlib\animation.py:781: UserWarning: MovieWriter ffmpeg unavailable  warnings.warn("MovieWriter %s unavailable" % writer)---------------------------------------------------------------------------ValueError                                Traceback (most recent call last)<ipython-input-1-2c23ec3f11d2> in <module>()     25      26 ani = animation.FuncAnimation(plt.gcf(), updatefig, frames=40, init_func=initfig)---> 27 ani.save('_movie.mp4')C:\portabel\miniconda\envs\katins2\lib\site-packages\matplotlib\animation.pyc in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs)    786                                                         metadata=metadata)    787                 except IndexError:--> 788                     raise ValueError("Cannot save animation: no writers are "    789                                      "available. Please install mencoder or "    790                                      "ffmpeg to save animations.")ValueError: Cannot save animation: no writers are available. Please install mencoder or ffmpeg to save animations.

This runtime error should give that information:https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/animation.py#L788

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp