When one of the thermophysical properties isn't listed in the JSON file, you end up not initializing the properties correctly.
mistlib/core.py, Line 80-92:
if (file == None):
# Set all values to None
self.name = None
self.notes = None
self.composition = None
self.single_phase_properties = None
for p in self.thermophysical_property_names:
self.properties[p] = None
else:
# Call the load from file method
self.load_json(file)
If you try to run mat.write_markdown("export.md") after loading the JSON in the ramen example problem, then you get the following error.
Traceback:
Traceback (most recent call last):
File "AlCu_eutectic_spacing_pdf.py", line 17, in <module>
mat.write_pdf(file)
File "c:\users\ygk\dev\mist\mistlib\core.py", line 273, in write_pdf
self.write_markdown(temp_md_file)
File "c:\users\ygk\dev\mist\mistlib\core.py", line 224, in write_markdown
next_ref = self.properties[p].reference
KeyError: 'density'
Further errors in that code block would be thrown at print_name_str = self.properties[p].print_name and anywhere else that tries to access properties[p] for a value of p that was not initialized.
When one of the thermophysical properties isn't listed in the JSON file, you end up not initializing the properties correctly.
mistlib/core.py, Line 80-92:
If you try to run
mat.write_markdown("export.md")
after loading the JSON in the ramen example problem, then you get the following error.Traceback:
Further errors in that code block would be thrown at
print_name_str = self.properties[p].print_name
and anywhere else that tries to accessproperties[p]
for a value ofp
that was not initialized.