From 984e8f1a925afcd8c1af3cb8a80424cf94a04162 Mon Sep 17 00:00:00 2001 From: Dimas Ciputra Date: Fri, 4 Oct 2024 12:34:10 +0100 Subject: [PATCH] Fix download collection record (#4285) --- bims/download/collection_record.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bims/download/collection_record.py b/bims/download/collection_record.py index b5e1c88a9..dc7be7d90 100644 --- a/bims/download/collection_record.py +++ b/bims/download/collection_record.py @@ -176,7 +176,7 @@ def write_batch_to_csv(header, rows, path_file, start_index, upload_template_hea with open(taxon_group.occurrence_upload_template.path, 'r', encoding='utf-8') as csvfile: reader = csv.DictReader(csvfile) upload_template_headers = reader.fieldnames - except FileNotFoundError: + except (FileNotFoundError, UnicodeDecodeError): upload_template_headers = [] for obj in queryset_iterator(collection_results):