From 0105c16c2d6d215fb002a3555c77e9ed5e52d091 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Fri, 14 Dec 2018 12:45:27 +0100 Subject: [PATCH] give b64encode the bytes it wants --- screenless/bureau/publications/publications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenless/bureau/publications/publications.py b/screenless/bureau/publications/publications.py index eb6275c..8eecece 100644 --- a/screenless/bureau/publications/publications.py +++ b/screenless/bureau/publications/publications.py @@ -273,7 +273,7 @@ class Publications(Bureau): entry.source = feed.feed.title entry.dbhash = self._make_shorturl(entry.link) entry.svg = code128.svg("PBr." + entry.dbhash) - encoded_svg = b64encode(entry.svg).decode() + encoded_svg = b64encode(bytest(entry.svg, 'utf-8')).decode() encoded_data = "data:image/svg+xml;charset=utf-8;base64," + encoded_svg entry.svg = '' % encoded_data