Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.18k
stars
142
forks
source link
Fix activity name parsing for custom made activities (garmin instinct) #101
Custom made activities (I use such for custom workouts like WHM breathing and cold showers) miss their name in the DB - which makes them indistinguishable from each other if you do not now exact IDs.
Using logs I found that sporthere is None and thus there is an error calling sport.name and the activity does not get parsed and its name is not updated.
The issue is caused here since for custom made activities have following representation in JSON (at least using garmin instinct):
Custom made activities (I use such for custom workouts like WHM breathing and cold showers) miss their name in the DB - which makes them indistinguishable from each other if you do not now exact IDs.
Using logs I found that
sport
here isNone
and thus there is an error calling sport.name and the activity does not get parsed and its name is not updated.The issue is caused here since for custom made activities have following representation in JSON (at least using garmin instinct):
so their sport will be 17 -> Top level and subsport is 4 -> other and other is not in the
remap_gc_sport_to_fit
dict.Adding
other
fixes it and allows correct parsing.