mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #3555 (UnicodeDecodeError: ... unexpected code byte in Russian fb2)
This commit is contained in:
parent
74db760282
commit
be0a623e65
@ -45,7 +45,7 @@ class FB2Input(InputFormatPlugin):
|
||||
|
||||
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…
x
Reference in New Issue
Block a user