From 73ff7bd9ae934c812740a4f6e52f0e93d9ec2391 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 17 Feb 2014 20:47:00 +0530 Subject: [PATCH] Workaround for bug in lxml https://bugs.launchpad.net/lxml/+bug/1281139 This bug likely impacts lots of other code locations, but hopefully it will be fixed in lxml soonish. For the moment, I will add workarounds as and when I discover they are needed. --- src/calibre/ebooks/oeb/transforms/split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/transforms/split.py b/src/calibre/ebooks/oeb/transforms/split.py index 60d036a369..512215e6d9 100644 --- a/src/calibre/ebooks/oeb/transforms/split.py +++ b/src/calibre/ebooks/oeb/transforms/split.py @@ -138,7 +138,7 @@ class Split(object): page_breaks_.append((xp, x.get('pb_before', '0') == '1')) page_break_ids.append(id) - for elem in item.data.iter(): + for elem in item.data.iter(etree.Element): elem.attrib.pop('pb_order', False) elem.attrib.pop('pb_before', False)