garmin-connect-export
garmin-connect-export copied to clipboard
Error 410 and solution
Posting in case helpful. For a recent activity of mine, which I added to Connect manually, no GPX is available (see screenshot). Therefore with command-line defaults,
Traceback (most recent call last):
File "./gcexport.py", line 231, in <module>
raise Exception('Failed. Got an unexpected HTTP error (' + str(e.code) + ').')
Exception: Failed. Got an unexpected HTTP error (410).
When adding --format 'original'
, however, the export is successful.
Screenshot:
I also used original to download the files, that downloaded as a .fit file. not as friendly as a GPX.
I was running into a similar issue (except getting a 204 error). I fixed this for myself in my own fork if you'd like to check it out and modify it as necessary: https://github.com/joetimmerman/garmin-connect-export
I took the code from @moderation mentioned in one of the other issues, added exception handling for the 204 error, and added a "-n" switch which skips the xml validation step for .gpx files (otherwise I would get an uncaught exception from the parseString(data) call.) If you're still getting that same 410 error, it should be pretty easy to just add that check in the exception handling.
Also added a verbose option as suggested in the todo.
@joetimmerman cool to see some of my code in your fork. Considering the last commit to this repo was December 2015 and the code as is doesn't work it is probably time for @kjkjava to deprecate and point to some of the working forks.
@moderation agreed. Looks like @ebrensi has a fork with Python 3 compatibility and fixes for a few other issues (although I suspect it probably doesn't actually work at the moment due to the Garmin problems you addressed in your code). Might be worth trying to merge these two versions into a new repo.