Closed Shohreh closed 4 years ago
Is there a better solution than simply removing all [extensions] from the file created by gpxpy?
with open('input.from.gpxpy..gpx', 'r') as file:
data = file.read()
data = re.sub('<extensions>.+?</extensions>', '', data,flags=re.DOTALL|re.I)
f=open("input.from.gpxpy.cleaned.gpx","w")
f.write(data)
f.close()
This is most likely because the gpx file is missing namespaces inside <gpx ...>
. I made a test in https://github.com/tkrajina/gpxpy/commit/ac394b9bc4e8a5a5f8d59ca8202041d730424024 and this works (if proper namespaces are present).
PS. If you can reproduce a bug with a test script + gpx file (with all the namespaces) -- reopen the issue.
Hello,
When reading tracks from an input GPX file and saving them into an output file, I notice gpxpy (1.4.0) rewrites what's in [extensions], which prevents GpsTrackEditor (a Windows application) from opening the output file.
Here's an example from the input file:
And here's what ends up in the output file:
Any idea why?
Thank you.