Trying to do the following...
from lxml import etree from lxml.etree import fromstring if request.POST: parser = etree.XMLParser(ns_clean=True, recover=
The following solution from kernc worked for me:
from lxml import etree xml = u'' xml = bytes(bytearray(xml, encoding='utf-8')) # ADDENDUM OF THIS LINE (when unicode means utf-8, e.g. on Linux) etree.XML(xml) #