-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Would it be possible to allow there to be empty files in template directories?
Currently, if I attempt to load a directory with any empty files, I get an error, as so:
File ~/Desktop/HPflex/Semantic_MPC_Interface/.venv/lib/python3.10/site-packages/buildingmotif/dataclasses/library.py:533, in Library._read_yml_file(self, file, template_id_lookup, dependency_cache) 531 """Read a YML file into this library. Utility function for_load_from_directory`."""
532 contents = yaml.load(open(file, "r"), Loader=yaml.FullLoader)
--> 533 for templ_name, templ_spec in contents.items():
534 # compile the template body using its rules
535 templ_spec = compile_template_spec(templ_spec)
536 # input name of template
AttributeError: 'NoneType' object has no attribute 'items'
`
This is not a high priority issue, but I am using template directories that have a convention of having certain file names, which results in some empty files occasionally