diff --git a/lib/matplotlib/testing/compare.py b/lib/matplotlib/testing/compare.py index 8f52a48097ff..2f4fdf18c08d 100644 --- a/lib/matplotlib/testing/compare.py +++ b/lib/matplotlib/testing/compare.py @@ -204,9 +204,9 @@ def __call__(self, orig, dest): # Inkscape's output is not localized but gtk's is, so the output # stream probably has a mixed encoding. Using the filesystem # encoding should at least get the filenames right... - self._stderr.seek(0) + self._proc.stderr.seek(0) raise ImageComparisonFailure( - self._stderr.read().decode( + self._proc.stderr.read().decode( sys.getfilesystemencoding(), "replace")) from err