From 8bfdae4464f559d96cb182ba746285e5a77777e1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 2 Apr 2011 15:48:08 -0400 Subject: [PATCH] Fixed issue in css stream loading under Python 3 --- svg/charts/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svg/charts/graph.py b/svg/charts/graph.py index 84d96a0..d56934c 100644 --- a/svg/charts/graph.py +++ b/svg/charts/graph.py @@ -657,7 +657,7 @@ class Graph(object): @staticmethod def load_resource_stylesheet(name, subs=dict()): css_stream = pkg_resources.resource_stream('svg.charts', name) - css_string = css_stream.read() + css_string = css_stream.read().decode('utf-8') css_string = css_string % subs sheet = cssutils.parseString(css_string) return sheet