diff --git a/thermo_data/compile_to_bin.py b/thermo_data/compile_to_bin.py index a50ff62..99fe6bc 100644 --- a/thermo_data/compile_to_bin.py +++ b/thermo_data/compile_to_bin.py @@ -1,6 +1,7 @@ import yaml import struct import sys +import os def main(): @@ -53,6 +54,9 @@ def main(): offset += len(body) added_list.add(dat['name']) + # Ensure the output directory exists + os.makedirs(os.path.dirname(output_file), exist_ok=True) + with open(output_file, 'wb') as f: f.write(b'gapy') f.write(struct.pack('