Impossible to load GPX File: error bad GPX file

Bug #1857608 reported by Philippe tassin de Montaigu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GPX Viewer
Fix Released
Undecided
Unassigned

Bug Description

The content of the file is generated by android app "geotracker", tested and readable in google earth. See uploaded file.
Pop up message : "Vous avez choisi un fichier GPX invalide" (in english: "you've chosen an invalid GPX file"

Revision history for this message
Philippe tassin de Montaigu (philtass12monteg) wrote :
Revision history for this message
Wolfgang Rohdewald (wolfgang-rohdewald) wrote :

Same here. Worked with gpxviewer in Ubuntu 18.10, I don't know the version anymore. Now it is Debian bullseye with gpxviewer 1.0.1 and I cannot load anything anymore.

IMHO the real bug here is an absolutely useless error message. I had illegal gpx files before and I always had to reduce them until the error went away. Very frustrating.

After commenting out some code hiding exceptions in gpxviewer I finally got something useful:

ValueError: time data '2020-01-04T12:59:29.1Z' does not match format '%Y-%m-%dT%H:%M:%S%z'

The time 2020-01-04T12:59:29Z does work.

https://www.w3schools.com/XML/schema_dtypes_date.asp does allow fractions of seconds, the ValueError is wrong.

This bug was introduced with commit 55e0bf9347ef452540a17f8fdedb36fa48edec09
"Replace iso8601 class by strptime"

The commit does not state the reason for this change.

Please have look at parse_time in
https://github.com/tkrajina/gpxpy/blob/dev/gpxpy/gpxfield.py

Revision history for this message
Jochen Sprickerhof (v-launchpad-jochen-sprickerhof-de) wrote :

This is fixed in version 1.1.0.

Changed in gpxviewer:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.