Forum Discussion

jfpelletier's avatar
jfpelletier
Contributor
12 months ago
Solved

Parsing XML using a Python script returns an encoding error message

Hello all, I'm trying to parse an XML file using a Python script to extract and return the content of some textual elements, but the script is returning this error message: "Failure: 'ascii' codec c...
  • jfpelletier's avatar
    12 months ago

    Hey,

    Looks like I've solved my own issue... In my script, I had to encode the input document using the ".encode('utf-8')" method.

    I can now parse and correctly extract all the data that I need from the file.

    JF