From 20f04642212c44a5c8132d6fdc4d9b7cadf10123 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 26 Mar 2019 22:57:15 -0700 Subject: [PATCH] Add the recover back in, we need it. --- openlp/plugins/songs/lib/importers/presentationmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/songs/lib/importers/presentationmanager.py b/openlp/plugins/songs/lib/importers/presentationmanager.py index 7bfe336ee..760536da3 100644 --- a/openlp/plugins/songs/lib/importers/presentationmanager.py +++ b/openlp/plugins/songs/lib/importers/presentationmanager.py @@ -45,7 +45,7 @@ class PresentationManagerImport(SongImport): return self.import_wizard.increment_progress_bar(WizardStrings.ImportingType.format(source=file_path.name)) try: - tree = etree.parse(str(file_path), parser=etree.XMLParser()) + tree = etree.parse(str(file_path), parser=etree.XMLParser(recover=True)) except etree.XMLSyntaxError: # Try to detect encoding and use it encoding = get_file_encoding(file_path)['encoding'] @@ -53,7 +53,7 @@ class PresentationManagerImport(SongImport): text = file_path.read_text(encoding=encoding) text = re.sub(r'.+\?>\n', '', text) try: - tree = etree.fromstring(text, parser=etree.XMLParser()) + tree = etree.fromstring(text, parser=etree.XMLParser(recover=True)) except ValueError: self.log_error(file_path, translate('SongsPlugin.PresentationManagerImport',