From 87bffb01870b6a806b58ff40d9bb42d5d589f3bb Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 11 Aug 2024 21:12:43 +0300 Subject: [PATCH] Fix(bkmk_robot_base): Decode base64 bytes to unicode --- Robots/bkmk_robot_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Robots/bkmk_robot_base.py b/Robots/bkmk_robot_base.py index bb90d88..7c2e08d 100644 --- a/Robots/bkmk_robot_base.py +++ b/Robots/bkmk_robot_base.py @@ -259,7 +259,8 @@ class robot_base(Robot): if not isinstance(icon_data, bytes): icon_data = icon_data.encode('latin1') bookmark.icon = "data:%s;base64,%s" \ - % (content_type, b64encode(icon_data)) + % (content_type, + b64encode(icon_data).decode('ascii')) icons[icon_url] = (content_type, bookmark.icon ) -- 2.39.5