magnific0 / nokia-weight-sync

Get weight from Nokia Health and update in Garmin Connect or Smashrun
GNU General Public License v3.0
71 stars 30 forks source link

Error upon connecting to Garmin #3

Closed jschram closed 6 years ago

jschram commented 6 years ago

After configuring, the sync from Nokia to Garmin fails. (Since I see an error about APIException not being defined, I've added the exception as print() as well):


GC redeem-start error 503 <html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>

Traceback (most recent call last):
  File "./nokia-weight-sync.py", line 268, in <module>
    session = garmin.login(config.get('garmin','username'), config.get('garmin','password'))
  File "/Volumes/Code/nokia-weight-sync/garmin.py", line 135, in login
    session = self._get_session(email=username, password=password)
  File "/Volumes/Code/nokia-weight-sync/garmin.py", line 96, in _get_session
    raise APIException("GC redeem-start error %s %s" % (gcRedeemResp.status_code, gcRedeemResp.text))
NameError: name 'APIException' is not defined```

Did Garmin perhaps change their endpoints?
magnific0 commented 6 years ago

@jschram thanks for reporting this issue. I am experiencing it too. Unfortunately it seems that something has changed on Garmin's side. I'll look into to this problem and see whether it can be resolved, but that will probably only happen later this week.

magnific0 commented 6 years ago

@jschram I just had a quick look and it seems indeed Garmin's end that changed. However, the people over at tapiriik were already on top of this, so it was straight forward for me to copy these changes.

So the problem should be fixed now. Can you pull the latest code and let me know if it works for you too?

jschram commented 6 years ago

Thanks for your quick response @magnific0, it's successfully syncing now. 👍