msdparser returns a value of None when a parameter has no colon separator (e.g. #KEY;). This deserializes into a simfile object correctly, but attempting to serialize it back to a string throws an AttributeError:
File "/lib/python3.10/site-packages/simfile/_private/serializable.py", line 19, in __str__
self.serialize(serialized)
File "/lib/python3.10/site-packages/simfile/base.py", line 191, in serialize
file.write(f"{param}\n")
File "/lib/python3.10/site-packages/msdparser/parameter.py", line 87, in __str__
self.serialize(output, escapes=escapes)
File "/lib/python3.10/site-packages/msdparser/parameter.py", line 80, in serialize
file.write(MSDParameter.serialize_component(component, escapes=escapes))
File "/lib/python3.10/site-packages/msdparser/parameter.py", line 57, in serialize_component
return reduce(
File "/lib/python3.10/site-packages/msdparser/parameter.py", line 58, in <lambda>
lambda key, esc: key.replace(esc, f"\\{esc}"),
AttributeError: 'NoneType' object has no attribute 'replace'
msdparser returns a value of
None
when a parameter has no colon separator (e.g.#KEY;
). This deserializes into a simfile object correctly, but attempting to serialize it back to a string throws anAttributeError
: