From 6f23c503d35fedae0ee8cdda017f88763a05828a Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Fri, 16 Nov 2012 07:52:31 +0100 Subject: Extensions. Fix for Bug #1075321 (TypeError: decoding Unicode is not supported) by Aapo Rantalainen. (bzr r11877) --- share/extensions/embedimage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/extensions/embedimage.py b/share/extensions/embedimage.py index 159c3c152..bdc15bde2 100755 --- a/share/extensions/embedimage.py +++ b/share/extensions/embedimage.py @@ -75,8 +75,11 @@ class Embedder(inkex.Effect): if (absref != None): path=absref - path=unicode(path, "utf-8") - + try: + path=unicode(path, "utf-8") + except TypeError: + path=path + if (not os.path.isfile(path)): inkex.errormsg(_('No xlink:href or sodipodi:absref attributes found, or they do not point to an existing file! Unable to embed image.')) if path: -- cgit v1.2.3