Jump to content

GPS Babel errors out processing GPX file


gpxduck

Recommended Posts

I have a GPX log file that errors out when I try to convert it to a CSV file using GPS Babel.

 

I've tried uploading it to a few sites (like GPS visualizer) that supposedly fix files with GPX errors but no joy.

 

I opened it in the foxe XML editor and to me it looks fine there.

 

The error message I get from GPS Babel is;

Quote

 

GPX Read error: "Extra content at end of document." File: "C:/Users/dws/Google Drive/!TEMP#####/DCIM/200728.K75SN2.Coast/tm20200728_174023.gpx" Line: 25 Column: 40

 

Error running gpsbabel: Process exited unsuccessfully with code 1

 

 

Here's a link to the GPX file:

http://dws.x10host.com/tm20200728_174023.gpx

Link to comment

GPSBabel (one word) told you exactly what the problem is. Your GPX file is nonsensical, jumping the rails starting at line #25. There's a closing GPX tag at line 24 but there's gibberish following that. By the time it got to character #40 in the 25'th line, it abandoned hope and baked you an error message cake.

                <trkpt lon="-122.97039" lat="47.62169"><name>Finish : 28/07/2020 10:40:23</name><desc>38.5 Miles</desc><cmt>0 Mph</cmt><time>2020-07-28T17:40:23Z</time><speed>0.0</speed><ele>106.3</ele><sat>0</sat><course>0</course></trkpt>
        </trkseg>
</trk>
</gpx>
        <rtept lon="-122.97039" lat="47.62169"><name>Start : 28/07/2020 10:40:23</name><desc>38.5 Miles</desc><cmt>0 Mph</cmt><time>2020-07-28T17:40:23Z</time><speed>0.0</speed><ele>106.3</ele><sat>0</sat><course>0</course></rtept>
        <rtept lon="-123.34444" lat="47.02553"><name></name><desc>97


"Looking fine" isn't the same as being fine unless you're actually familiar with the GPX specification. (I am and the file does not "look fine".)  You can't just signal the end of the gpx document and then have dangling rtepts that aren't part of an rte that aren't part of a gpx and such. Structure matters. Those tags actually have meaning and the order usually counts. See the specification at https://www.topografix.com/gpx.asp.

GPSBabel will let you get away with an otherwise valid <rte></rte> block before the <wpt> block, but it's not actually valid GPX if you do. GPSBabel will (mostly) "fix" the order of the inner tags when it writes it, but the file has to be at least kind of valid to start with.  There are trkpts that have escaped their trksegs with totally absent trk tags. This file kind of resembles GPX, but it needs reconstructive surgery to make it something valid and useful.

This also doesn't appear to be actually geocaching related.  GPSBabel is a conversion utility, not a file recovery program to unscramble things. A large part of GPSVisualizer is a front-end to GPSBabel.

Whatever created this file did not create a valid GPX file.

  • Upvote 1
  • Helpful 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...