Skip to content

Merge 1.5.x to 2.x #6443

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

Merged
merged 13 commits into from
May 21, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
MNT: Improve error message when saving animation fails.
  • Loading branch information
dopplershift committed May 17, 2016
commit ecfc1e724173e2ac7bb8e3d1fe9a368e976b3df5
6 changes: 4 additions & 2 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,14 @@ def grab_frame(self, **savefig_kwargs):
# frame format and dpi.
self.fig.savefig(self._frame_sink(), format=self.frame_format,
dpi=self.dpi, **savefig_kwargs)
except RuntimeError:
except (RuntimeError, IOError):
out, err = self._proc.communicate()
verbose.report('MovieWriter -- Error '
'running proc:\n%s\n%s' % (out,
err), level='helpful')
raise
raise IOError('Error saving animation to file. '
'Stdout: {0} StdError: {1}. It may help to re-run '
'with --verbose-debug.'.format(out, err))

def _frame_sink(self):
'Returns the place to which frames should be written.'
Expand Down