Closed ajamess closed 4 days ago
I found another example of such a broken activity:
Turns out I had a few hundred of them. I was able to bulk update their titles to "Other" in the screenshot below. The broken ones show up as "untitled", which map to a NULL activity name. I think many old activities may have this problem. So it is likely worth fixing the issue for folks like me who have been using garmin watches for a long time. I have activities going back to 2011, and it appears the issue started with these names around the 2015 timeframe. Here are some examples:
Fixed on the develop branch. Will be released soon.
I had an activity that did not have a title by default which caused a KeyError. I resolved this by updating the activity in Garmin Connect manually, but I think the script could handle this scenario better.
The way this activity appeared in Garmin Connect was the title here was marked as "Untitled" in the blue circle. I have since given it a title (Treadmill Running, as in the screenshot) to address the script issue.
The behavior of the script when encountering an "untitled" activity like this is to throw a KeyError
When "activityName" is NULL, like in my example, there is no Key to look up in the activity[] dictionary, so the script errors.
The fix was for me to run PDB and find the failing activity ID, then manually update the title in Garmin Connect so the script would no longer fail. I am not sure how the activity ended up with no name. It might be some corner case on the Garmin side, because out of 2095 activities I imported, only 1 of them had this problem.
I see a few potential fixes to this corner case:
Thanks for your hard work on this script! It's very cool.