You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#open filewithopen('test.gpx', 'r') asgpx_file:
gpx=gpxpy.parse(gpx_file)
print(gpx.extensions)
print(gpx.metadata_extensions)
# save to a filewithopen('output.gpx', 'w') asf:
f.write(gpx.to_xml())
#open written file againwithopen('output.gpx', 'r') asgpx_file:
gpx_copy=gpxpy.parse(gpx_file) # GPXXMLSyntaxException: Error parsing XML: not well-formed (invalid token): line 7, column 12
With the above attached code, when I read a file and save it, I cannot retrieve it again until I remove the extension. Getting either the extensions or the metadata extensions returns a blank list. I cannot seem to access the extension to remedy the problem.
For reference, this is the original GPX file (which can be opened)
With the above attached code, when I read a file and save it, I cannot retrieve it again until I remove the extension. Getting either the extensions or the metadata extensions returns a blank list. I cannot seem to access the extension to remedy the problem.
For reference, this is the original GPX file (which can be opened)
And this is the written file
The text was updated successfully, but these errors were encountered: