Closed tkang007 closed 3 years ago
As stated in the documentation, the second argument to dump_xml()
must be a binary filehandle, but you are passing a text filehandle. In Python 3, you create a binary filehandle by including a b
in the open()
mode, i.e., by writing:
with open('xml.properties', 'wb') as wf:
# Add this ^
javaproperties.dump_xml(properties, wf, sort_keys=True)
Hello,
I would like to report an abnormal case on dump_xml method with below code and output. Please let me know if I am misusing in system default, UTF8 locale environment.
test code
test ouptut
javaproperties version
Thanks, TK