[Twisted-Python] raw xml to element, char encoding/decoding error

Gabriel Rossetti gabriel.rossetti at arimaz.com
Wed Feb 18 06:57:56 MST 2009


Ralph Meijer wrote:
> On 2009-02-18 12:14, Gabriel Rossetti wrote:
>> Hello,
>>
>> I wrote some code to transform a raw XML string into a 
>> domish.Element, and I keep on getting char encoding/decoding errors :
>>
>> [..]
>>            parser.parse(tmp.toXml())
> > [..]
>
> Parser input is expected to be a string, not unicode. Try this instead:
>
>   parser.parse(tmp.toXml().encode('utf-8'))
>
> ralphm
>
Hello Ralphm,

yes, I had fixed that in the code attached in my last msg, it only works 
in Eclipse though.

Gabriel




More information about the Twisted-Python mailing list