Jan-25-2020, 09:45 PM
Hello,
For some reason,the gpxpy library isn't happy parsing the following very basic GPX (XML) file:
Thank you.
For some reason,the gpxpy library isn't happy parsing the following very basic GPX (XML) file:
<?xml version="1.0" encoding="UTF-8"?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
creator="BRouter-1.5.5" version="1.1">
<trk>
<trkseg>
<trkpt lat="46.718843188136816" lon="-2.339932657778263">
<ele>0</ele>
</trkpt>
</trkseg>
</trk>
</gpx>import gpxpy
import gpxpy.gpx
f = open('input.gpx', 'r')
"""
Traceback (most recent call last):
gpxpy.gpx.GPXXMLSyntaxException: Error parsing XML: not well-formed (invalid token): line 1, column 1
"""
gpx = gpxpy.parse(f)Googles shows that some users had the same issue, but offered no solution. Any idea what it could be?Thank you.
