Need to return a unicode string in the xml factory.

The underlying data is put into json documents that expect unicode
strings not byte strings.  In python2 lxml provided strings that were
auto coerced but in python3 it provides byte strings.
This commit is contained in:
Feanil Patel
2019-09-12 15:11:44 -04:00
parent a3d39eaeb6
commit fb59752c75

View File

@@ -102,7 +102,7 @@ class ResponseXMLFactory(six.with_metaclass(ABCMeta, object)):
explanation_div.set("class", "detailed-solution")
explanation_div.text = explanation_text
return etree.tostring(root)
return etree.tostring(root).decode('utf-8')
@staticmethod
def textline_input_xml(**kwargs):