Issue with the python upload script garminbadges-updater.py
The python upload script garminbadges-updater.py found here is currently not working. Garmin changed something on their side which breaks Garth (the python package that handles communication with Garmin Connect).
The issue is being discussed here: https://github.com/matin/garth/issues/73
Until it is fixed in Garth, released and the user updates the package there is a fix that works.
Locate the garth package on your computer. On my Windows machine it is found at this path:
C:\Users\[my user]\AppData\Roaming\Python\Python312\site-packages\garth
Open the file http.py in a text editor.
Locate this code:
USER_AGENT = {
"User-Agent": (
"Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) "
"AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
),
}
"User-Agent": (
"Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) "
"AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
),
}
And change it to:
USER_AGENT = {
"User-Agent": ("GCM-iOS-5.7.2.1"),
}
"User-Agent": ("GCM-iOS-5.7.2.1"),
}
Save the file and everything should work again.
Garmin Badge Database
Garmin Connect
Change country setting
Works, thanks!
ReplyDeleteGarth may be installed to `c:\Program Files\Python312\Lib\site-packages\garth\`
ReplyDelete