diff --git a/tasks/batch_export_ead_archiveswest.py b/tasks/batch_export_ead_archiveswest.py index 223778a..321e6c4 100644 --- a/tasks/batch_export_ead_archiveswest.py +++ b/tasks/batch_export_ead_archiveswest.py @@ -40,7 +40,11 @@ def run(self): % (repo_id, resource_id, options[0], options[1], options[2], options[3]) # Export resource resp = super()._call(url, "get", None) - as_xml = etree.fromstring(resp.text.encode('utf-8')) + try: + as_xml = etree.fromstring(resp.text.encode('utf-8')) + except Exception as e: + self.logger.exception('Could not parse received XML') + continue # Build ArchivesWest XML namespaces = {