8000 ENH: raise a more informative error when no animation writers are ava… · AmitAronovitch/matplotlib@6b17b17 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b17b17

Browse files
committed
ENH: raise a more informative error when no animation writers are available
1 parent a1f8b4e commit 6b17b17

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/animation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,11 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
595595
the individual frames. This can be used to set tight bounding boxes,
596596
for example.
597597
'''
598+
if len(writers.list()) == 0:
599+
raise ValueError("Cannot save animation: no writers are "
600+
"available. Please install mencoder or "
601+
"ffmpeg to save animations.")
602+
598603
if savefig_kwargs is None:
599604
savefig_kwargs = {}
600605

0 commit comments

Comments
 (0)
0