0
from pykml import parser
from os import path
import pandas as pd

kml_file = path.join( r'file.kml')

with open(kml_file) as f:
    doc = parser.parse(f)

Trying to make this one working in python and pyKML, but it's failing to parse Qname in line and column

ex:lxml.etree.XMLSyntaxError: Failed to parse QName ':anonymous', line 32447, column 17

mzjn
  • 48,958
  • 13
  • 128
  • 248
  • You probably have whitespace after the `anonymous:` namespace prefix in a start tag. Something like `...` instead of `...`. We could verify this if you showed us line 32447. – mzjn Jun 16 '21 at 16:59
  • 1 <:anonymous /> 3447 8.16000833333333,44.07492,0 so i have to delete the whitespace only here right? – Konstantinos Paliouras Jun 17 '21 at 12:02
  • 1
    The error is similar to what I guessed but not exactly the same. `<:anonymous />` is not a valid (self-closing) element. There has to be a prefix before the colon. Perhaps you can just remove the colon. – mzjn Jun 17 '21 at 12:22

0 Answers0