From f0dd46e668a55bd024f5dee4e99cf1215a107c26 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 2 Oct 2020 03:48:23 +0300 Subject: Ignore utf-8 encoding errors * wqflask/base/trait.py (retrieve_trait_info): Add extra param to ignore errors such as: "utf-8 codec can't decode byte 0xb5 in position 0: invalid start byte" thrown in Python3. --- wqflask/base/trait.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask/base') diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 24d0476d..a493cfbf 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -497,7 +497,7 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False): for i, field in enumerate(dataset.display_fields): holder = trait_info[i] if isinstance(holder, bytes): - holder = holder.decode('utf-8') + holder = holder.decode("utf-8", errors="ignore") setattr(trait, field, holder) if dataset.type == 'Publish': -- cgit v1.2.3