diff --git a/src/blenderbim/blenderbim/bim/ifc.py b/src/blenderbim/blenderbim/bim/ifc.py index b83287a98a..68506bb125 100644 --- a/src/blenderbim/blenderbim/bim/ifc.py +++ b/src/blenderbim/blenderbim/bim/ifc.py @@ -96,10 +96,13 @@ class IfcStore: try: IfcStore.cache = ifcopenshell.geom.serializers.hdf5(IfcStore.cache_path, cache_settings) except: - os.remove(IfcStore.cache_path) - try: - IfcStore.cache = ifcopenshell.geom.serializers.hdf5(IfcStore.cache_path, cache_settings) - except: + if os.path.exists(IfcStore.cache_path): + os.remove(IfcStore.cache_path) + try: + IfcStore.cache = ifcopenshell.geom.serializers.hdf5(IfcStore.cache_path, cache_settings) + except: + return + else: return return IfcStore.cache