Open hkolkhorst opened 9 years ago
An example JSON excerpt from the activities page:
{
"workouts":[{
"id":"1392479",
"date_ymd":"2015-07-25",
"start_time":"10:34:00",
"dur_time":"01:07:25",
"dist_km":"13.800000","asc_m":"94.000000",
"dsc_m":"98.000000",
"alt_min_m":"220.000000",
"alt_max_m":"273.000000","spd_avg_kph":"12.880000",
"spd_max_kph":"30.030001","hr_avg_bpm":"",
"hr_max_bpm":"","cad_avg_rpm":"",
"cad_max_rpm":"","pwr_avg_w":"",
"pwr_max_w":"","borg_rpe":"5","sport_id":"2",
"sport_name":"Laufsport",
"type_id":"3972",
"type_name":"Frühstückslauf",
"route_id":"0",
"route_name":"","equipment_ids":["2118"],
"equipment_names":["Adrenaline GTS 13 B"],"weather_id":"",
"weather_name":"",
"temp_c":"",
"wind_bft":"","kcal":"942","file":"1",
"file_type":"TCX",
"workout_comment":"",
"hide":"",
"last_change":"2015-07-25T19:33:27"
}
My guess would be, that it's a type error in the reverse activity mappings:
Velohero returns the sport_id
as a string, but the keys in _reverseActivityMappings
in https://github.com/cpfair/tapiriik/blob/master/tapiriik/services/VeloHero/velohero.py#L54 are integers.
So the condition in https://github.com/cpfair/tapiriik/blob/master/tapiriik/services/VeloHero/velohero.py#L204 if workout["sport_id"] in self._reverseActivityMappings:
is probably always false?
Hence my solution would be to make the keys in _reverseActivityMappings
strings.
Thank you for the feedback. Error is corrected with https://github.com/cpfair/tapiriik/pull/164.
The sync from Velohero to Strava is not working: Activities are recognized, but not synced; the activities page shows the following error:
Since the activity type is set to "Other", I suppose the parsing of Velohero data is somewhat faulty