diff --git a/teaser/data/dataclass.py b/teaser/data/dataclass.py index f5dd9c269..200527198 100644 --- a/teaser/data/dataclass.py +++ b/teaser/data/dataclass.py @@ -130,16 +130,20 @@ def load_mat_binding(self): if version_parse is False: import teaser.data.bindings.v_0_4.material_bind as mat_bind - self.element_bind = mat_bind.MaterialTemplates() - if bool(version_parse.getroot().attrib) is False: + self.material_bind = mat_bind.MaterialTemplates() + elif bool(version_parse.getroot().attrib) is False: warnings.warn( "You are using an old version of material data base XML file") import teaser.data.bindings.v_0_3_9.material_bind as mat_bind + self.material_bind = mat_bind.CreateFromDocument( + __xml_file_mat.read()) elif version_parse.getroot().attrib['version'] == "0.3.9": warnings.warn( "You are using an old version of material data base XML file") import teaser.data.bindings.v_0_3_9.material_bind as mat_bind + self.material_bind = mat_bind.CreateFromDocument( + __xml_file_mat.read()) elif version_parse.getroot().attrib['version'] == "0.4": import teaser.data.bindings.v_0_4.material_bind as mat_bind - - self.material_bind = mat_bind.CreateFromDocument(__xml_file_mat.read()) \ No newline at end of file + self.material_bind = mat_bind.CreateFromDocument( + __xml_file_mat.read())