diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 4cbf29d75e..24560c49d7 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -1486,6 +1486,8 @@ class Guide(object): return elem def to_opf2(self, parent=None): + if not len(self): + return elem = element(parent, OPF('guide')) for ref in self.refs.values(): attrib = {'type': ref.type, 'href': urlunquote(ref.href)}