Closed Shohreh closed 4 years ago
Hello,
Using Python 3.7.0 on Windows, gpxpy — both 0.9.8 and 1.4.0 — fails reading this GPX file using the following code:
import gpxpy import gpxpy.gpx f = open('Piste_01.gpx', 'r') #gpxpy.gpx.GPXXMLSyntaxException: Error parsing XML: not well-formed (invalid token): line 1, column 1 gpx = gpxpy.parse(f)
Any idea what it could be?
I'm trying to read all [trk] found in multiple GPX files, and merge them into a single GPX file.
Thank you.
Found it: It contained the BOM at the top, which isn't displayed unless opening the file in hex mode.
Removing the BOM solved the issue.
https://simple.wikipedia.org/wiki/Byte_order_mark
HTH,
Hello,
Using Python 3.7.0 on Windows, gpxpy — both 0.9.8 and 1.4.0 — fails reading this GPX file using the following code:
Any idea what it could be?
I'm trying to read all [trk] found in multiple GPX files, and merge them into a single GPX file.
Thank you.