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

Appearance settings

Commit ecfc1e7

Browse filesBrowse files
committed
MNT: Improve error message when saving animation fails.
1 parent 7d1f717 commit ecfc1e7
Copy full SHA for ecfc1e7

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,14 @@ def grab_frame(self, **savefig_kwargs):
234234
# frame format and dpi.
235235
self.fig.savefig(self._frame_sink(), format=self.frame_format,
236236
dpi=self.dpi, **savefig_kwargs)
237-
except RuntimeError:
237+
except (RuntimeError, IOError):
238238
out, err = self._proc.communicate()
239239
verbose.report('MovieWriter -- Error '
240240
'running proc:\n%s\n%s' % (out,
241241
err), level='helpful')
242-
raise
242+
raise IOError('Error saving animation to file. '
243+
'Stdout: {0} StdError: {1}. It may help to re-run '
244+
'with --verbose-debug.'.format(out, err))
243245

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.