diff --git a/src/speckleifc/property_extraction.py b/src/speckleifc/property_extraction.py index 2e6e618..62ec785 100644 --- a/src/speckleifc/property_extraction.py +++ b/src/speckleifc/property_extraction.py @@ -1,3 +1,4 @@ +import math from typing import Any, Tuple from ifcopenshell.entity_instance import entity_instance @@ -134,6 +135,10 @@ def _get_quantities( value = getattr(quantity, quantity.attribute_name(3)) unit_info = _get_unit_info(element, quantity) + # Server does not consider `NaN` valid json + if math.isnan(value): + value = None + if unit_info: # Create structured quantity object with units results[quantity_name] = {