mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 21:14:28 +01:00
Fix #3555 (UnicodeDecodeError: ... unexpected code byte in Russian fb2)
This commit is contained in:
parent
74db760282
commit
be0a623e65
2 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ def convert(self, stream, options, file_ext, log,
|
|||
|
||||
log.debug('Parsing XML...')
|
||||
parser = etree.XMLParser(recover=True, no_network=True)
|
||||
doc = etree.parse(stream, parser)
|
||||
doc = etree.fromstring(stream.read())
|
||||
self.extract_embedded_content(doc)
|
||||
log.debug('Converting XML to HTML...')
|
||||
ss = open(P('templates/fb2.xsl'), 'rb').read()
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ def metadata_from_filename(name, pat=None):
|
|||
au = match.group('author')
|
||||
aus = string_to_authors(au)
|
||||
mi.authors = aus
|
||||
except IndexError:
|
||||
except (IndexError, ValueError):
|
||||
pass
|
||||
try:
|
||||
mi.series = match.group('series')
|
||||
|
|
|
|||
Loading…
Reference in a new issue