Below is part of my python script that is giving error:
tree = ET.ElementTree(element_table)
xml = ET.tostring(element_table)
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><?xml- stylesheet type=\"text/xsl\" href=\".\/xsl\/brsdk.xsl\"?>" + xml
obis_file = open( "OBIS_Support_Chart_" + sdk_version.replace( ".","_" ) + ".xml", "w" )
obis_file.write( xml.decode('utf8') )
The error flagged during running of the script is as below:
Traceback (most recent call last):
File "parse.py", line 115, in <module>
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><?xml- stylesheet type=\"text/xsl\" href=\".\/xsl\/brsdk.xsl\"?>" + xml
TypeError: Can't convert 'bytes' object to str implicitly
What is problem there in the script? I am using Python 3.4.