From 38b3743e992fac35a3cec7d438f70f1c1c8ef833 Mon Sep 17 00:00:00 2001 From: Maria dErrico Date: Wed, 7 Jun 2023 11:12:18 +0200 Subject: [PATCH] Adapt the script to the new B-Fabric representation of empty values in datasets Package version 0.13.2 --- bfabric/_version.py | 2 +- bfabric/scripts/bfabric_save_dataset2csv.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bfabric/_version.py b/bfabric/_version.py index 7e0dc0e8..83ce76fb 100644 --- a/bfabric/_version.py +++ b/bfabric/_version.py @@ -1 +1 @@ -__version__ = "0.13.1" +__version__ = "0.13.2" diff --git a/bfabric/scripts/bfabric_save_dataset2csv.py b/bfabric/scripts/bfabric_save_dataset2csv.py index 8b3453f2..a583d9a1 100755 --- a/bfabric/scripts/bfabric_save_dataset2csv.py +++ b/bfabric/scripts/bfabric_save_dataset2csv.py @@ -25,7 +25,7 @@ def dataset2csv(ds, outputfile, sep=","): for i in ds.item: # sort values based on the columns order in attributeposition for x in i.field: - if not hasattr(x,"value"): + if not hasattr(x,"value") or x.value == None: x.value = '' fields = [(x.value, x.attributeposition) for x in i.field] fields.sort(key=lambda y: int(y[1]))