diff --git a/src/calibre/ebooks/chm/input.py b/src/calibre/ebooks/chm/input.py index f55a76d67e..61160e8dac 100644 --- a/src/calibre/ebooks/chm/input.py +++ b/src/calibre/ebooks/chm/input.py @@ -51,6 +51,7 @@ class CHMInput(InputFormatPlugin): mainpath = os.path.join(tdir, mainname) metadata = get_metadata_from_reader(self._chm_reader) + self._chm_reader.CloseCHM() odi = options.debug_pipeline options.debug_pipeline = None diff --git a/src/calibre/ebooks/oeb/transforms/page_margin.py b/src/calibre/ebooks/oeb/transforms/page_margin.py index bc1925e343..d7c99d24c6 100644 --- a/src/calibre/ebooks/oeb/transforms/page_margin.py +++ b/src/calibre/ebooks/oeb/transforms/page_margin.py @@ -20,8 +20,9 @@ class RemoveAdobeMargins(object): self.oeb, self.opts, self.log = oeb, opts, log for item in self.oeb.manifest: - if item.media_type in ('application/vnd.adobe-page-template+xml', - 'application/vnd.adobe.page-template+xml'): + if (item.media_type in ('application/vnd.adobe-page-template+xml', + 'application/vnd.adobe.page-template+xml') and + hasattr(item.data, 'xpath')): self.log('Removing page margins specified in the' ' Adobe page template') for elem in item.data.xpath( diff --git a/src/calibre/gui2/metadata/basic_widgets.py b/src/calibre/gui2/metadata/basic_widgets.py index b2ee79c9c0..73913ba58f 100644 --- a/src/calibre/gui2/metadata/basic_widgets.py +++ b/src/calibre/gui2/metadata/basic_widgets.py @@ -846,7 +846,7 @@ class RatingEdit(QSpinBox): # {{{ class TagsEdit(MultiCompleteLineEdit): # {{{ LABEL = _('Ta&gs:') TOOLTIP = '

'+_('Tags categorize the book. This is particularly ' - 'useful while searching.

They can be any words' + 'useful while searching.

They can be any words ' 'or phrases, separated by commas.') def __init__(self, parent):