From a4933823203305f94ccee1a2187db332805545e9 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 1 Aug 2013 09:17:09 -0400 Subject: [PATCH] Fix bug reading favicon as a utf-8 encoded file. --- lib/matplotlib/backends/backend_webagg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/backend_webagg.py b/lib/matplotlib/backends/backend_webagg.py index 5b73fcab9963..d0b7c22d0cc9 100644 --- a/lib/matplotlib/backends/backend_webagg.py +++ b/lib/matplotlib/backends/backend_webagg.py @@ -378,7 +378,7 @@ class FavIcon(tornado.web.RequestHandler): def get(self): self.set_header('Content-Type', 'image/png') with open(os.path.join(WebAggApplication._mpl_dirs['images'], - 'matplotlib.png')) as fd: + 'matplotlib.png'), 'rb') as fd: self.write(fd.read()) class SingleFigurePage(tornado.web.RequestHandler):