1

Can't upload tcx with <Track> with single <Trackpoint>? (Read 522 times)

gregw


    Over the weekend I wrote a script to convert my SportTracks files (.fitlog) to .tcx to upload to runningahead.  I've been able to get my script to run through my .fitlog file and produce .tcx.  I've successfully uploaded many of the files to RA and they look good.  One (so far) has me scratching my head.  The file looks good to me but RA silently rejects it.  (After uploading, it just never appears.)  I think the problem is that one of the laps is very short (2 seconds) and has a Track with only one Trackpoint.  I think this should be allowed per the tcx schema.  It doesn't set minOccurs for Trackpoint, so it defaults to 1.  Of course, I might have just messed up the activity elsewhere!  I put the offending .tcx on pastebin at http://pastebin.com/m1db01374.  The potentially offending track starts at line 906.

    eric :)


      gregw,

      The import process happens in the background because it may some time and I didn't want it to tie up the web server.  Because of that, the error message can't be relayed back to the user.  When I created private messaging, I had every intention to forward error messages generated during the import process to the user but I figure I can do it at a later date because errors don't happen too often.

       

      In your case, your data is corrupt.  Look at line 2849 of the xml file.  The distance is somehow negative.  It will import correctly once you fix that.

       

      eric :-)

      gregw


        gregw,

        The import process happens in the background because it may some time and I didn't want it to tie up the web server.  Because of that, the error message can't be relayed back to the user.  When I created private messaging, I had every intention to forward error messages generated during the import process to the user but I figure I can do it at a later date because errors don't happen too often.

         

        In your case, your data is corrupt.  Look at line 2849 of the xml file.  The distance is somehow negative.  It will import correctly once you fix that.

         

        eric :-)

         

        Ah, thanks eric.  I saw that single point track and jumped to conclusions.  Thanks, Greg