magsol / garmin

Some scripts I've thrown together to analyze my Garmin data.
MIT License
70 stars 34 forks source link

Error Handling Login - Redirect issue #4

Closed brunix closed 9 years ago

brunix commented 9 years ago

It seems there is an issue with the Redirect. It was working fine a week ago. See below the error:

Traceback (most recent call last): File "garmin_parser.py", line 126, in download_files_for_user(username, password, output) File "garmin_parser.py", line 88, in download_files_for_user login(agent, username, password) File "garmin_parser.py", line 34, in login agent.open(REDIRECT) File "build/bdist.macosx-10.10-intel/egg/mechanize/_mechanize.py", line 203, in open File "build/bdist.macosx-10.10-intel/egg/mechanize/_mechanize.py", line 255, in _mech_open mechanize._response.httperror_seek_wrapper: HTTP Error 404: Not Found

magsol commented 9 years ago

I'm looking into the problem; they've really changed the login process. I'm having a hard time tracking down the exact problem, but from what I can tell it looks like they've added a service_token to the authentication process. Trying to figure out where that's generated and if I can append it to the existing URLs.

This will probably take a few more days.

brunix commented 9 years ago

I was reading this change.

https://github.com/wederbrand/workout-exchange/blob/master/garmin_connect/download_all.rb

I'm trying to apply the changes to see if I can manage to fix it. If I make progress I'll let you know.

magsol commented 9 years ago

Yes! That's precisely what needs to be implemented. I can work on it as well if you'd prefer.

brunix commented 9 years ago

If you could, it would be terrific! I'm more proficient in PHP than Ruby, indeed I was trying to translate it to PHP.

magsol commented 9 years ago

Got it working. Currently tidying up my fixes and will commit shortly.

magsol commented 9 years ago

This works for me again. Closing the ticket unless anyone else is still having problems.

brunix commented 9 years ago

Thanks Magsol! it works great!