python elementTree tostring write() argument must be str, not bytes code example
Example: python elementTree tostring write() argument must be str, not bytes
>>> type(tostring(element, encoding="unicode"))
>>> type(tostring(element, encoding="unicode"))