From 3ab7641fa9d1b5a3c33f0d30a27db6abb2bfaec7 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 30 Mar 2020 19:58:01 +0200 Subject: [PATCH] Fix animation writer fallback. Getting the next available writer was done incorrectly. --- lib/matplotlib/animation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index 51e5a5582ec5..896b9d87bb82 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -1090,7 +1090,7 @@ def func(current_frame: int, total_frames: int) -> Any if writers.is_available(writer): writer = writers[writer](fps, **writer_kwargs) else: - alt_writer = next(writers, None) + alt_writer = next(iter(writers), None) if alt_writer is None: raise ValueError("Cannot save animation: no writers are " "available. Please install ffmpeg to "