jonbeckett / wp2md

Wordpress XML Export to Markdown Text File Converter for Python 3.x
6 stars 2 forks source link

ExpatError #1

Open cjeller1592 opened 5 years ago

cjeller1592 commented 5 years ago

This is how I ran the program in the cmd line:

python export.py /Users/cjeller/Documents/Python/md2writeas/cjeller.wordpress.2019-07-09.post_type-post.start_date-2018-08-01.end_date-2018-11-30.001.xml /Users/cjeller/Documents/Python/md2writeas/output

Below is the Traceback I got:

Traceback (most recent call last):
  File "export.py", line 50, in <module>
    xml_doc = minidom.parse(source_file)
  File "/Users/cjeller/miniconda3/lib/python3.7/xml/dom/minidom.py", line 1958, in parse
    return expatbuilder.parse(file)
  File "/Users/cjeller/miniconda3/lib/python3.7/xml/dom/expatbuilder.py", line 911, in parse
    result = builder.parseFile(fp)
  File "/Users/cjeller/miniconda3/lib/python3.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 92, column 184

Could it be something with the XML file?

jonbeckett commented 5 years ago

Yep - that means either the XML isn't valid, or the minidom module is failing to interpret it correctly.