From 7567971a32eb39e0a413240cc49010dbede7a89c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 11 Jul 2023 21:41:06 +0200 Subject: [PATCH] Update entity_instance.py --- src/ifcopenshell-python/ifcopenshell/entity_instance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/entity_instance.py b/src/ifcopenshell-python/ifcopenshell/entity_instance.py index a52bff3fc7..62f1a03dab 100644 --- a/src/ifcopenshell-python/ifcopenshell/entity_instance.py +++ b/src/ifcopenshell-python/ifcopenshell/entity_instance.py @@ -166,8 +166,8 @@ class entity_instance(object): except: import os current_dir_files = {fn.lower(): fn for fn in os.listdir('.')} - schema_path = current_dir_files.get(schema_name + '.exp') - fn = schema_name + '.py' + schema_path = current_dir_files.get(schema_name.lower() + '.exp') + fn = schema_path[:-4] + '.py' if not os.path.exists(fn): subprocess.run([sys.executable, "-m", "ifcopenshell.express.rule_compiler", schema_path, fn], check=True) time.sleep(1.)