Fix for “Withings to Garmin Connect” authorisation problems

It has been reported that the script does not work anymore:

jhartman@wieloryb:~/scripts/withings-garmin-v2$ ./sync.py
Traceback (most recent call last):
  File "./sync.py", line 124, in <module>
    main()
  File "./sync.py", line 59, in main
    sync(**opts.__dict__)
  File "./sync.py", line 116, in sync
    cookie = garmin.login(garmin_username, garmin_password)
  File "/home/jhartman/scripts/withings-garmin-v2/garmin.py", line 132, in login
    cookies = self._get_cookies(email=username, password=password)
  File "/home/jhartman/scripts/withings-garmin-v2/garmin.py", line 100, in _get_cookies
    data["lt"] = re.search("name=\"lt\"\s+value=\"([^\"]+)\"", preResp.text).groups(1)[0]
AttributeError: 'NoneType' object has no attribute 'groups'

I’ve managed to fix it. See latest commit in https://github.com/jaroslawhartman/withings-garmin-v2

Fix for “Withings to Garmin Connect” authorisation problems
Tagged on:         

2 thoughts on “Fix for “Withings to Garmin Connect” authorisation problems

Leave a Reply

Your email address will not be published. Required fields are marked *