simonepri / fitbit2garmin

⬇ Downloads lifetime Fitbit data and exports it into the format supported by Garmin Connect data importer. This includes historical body composition data (weight, BMI, and fat percentage), activity data (calories burned, steps, distance, active minutes, and floors climbed), and individual GPS exercises (TCX).
MIT License
38 stars 1 forks source link

Some activities persistently fail to export #5

Open Xyene opened 8 months ago

Xyene commented 8 months ago

Thanks for writing this tool!

While exporting my data, I found some activities fail to export with:

ERROR:root:[...] activity-tcx-{...}: Request failed: 400, message='Bad Request', url=URL('https://api.fitbit.com/1/user/-/activities/{...}.tcx')

This error persists between restarts of both fitbit2garmin as well as clearing of the auth token. I assume there's something wrong on the Fitbit side.

This is unfortunate, because the logic as-written will continue retrying such activities forever and not make further progress. Maybe it's worth giving up after 10 failures, or something like that?

I locally worked around this by patching to not try exporting the broken activities, but figured I'd open this issue for posterity.

blake5634 commented 2 months ago

Which activities were broken? On Google Pixel 2, Walks are coded as "Other"