aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorBonfaceKilz2020-10-02 03:48:23 +0300
committerBonfaceKilz2020-10-02 04:05:03 +0300
commitf0dd46e668a55bd024f5dee4e99cf1215a107c26 (patch)
treee3d4434bd290f54705a9f28e12775fd258ab53ac /wqflask/base
parent11180abbba8af29499e6eda2c7c408fc4e0eb80a (diff)
downloadgenenetwork2-f0dd46e668a55bd024f5dee4e99cf1215a107c26.tar.gz
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.
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/trait.py2
1 files changed, 1 insertions, 1 deletions
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':