yihong0618 / running_page

Make your own running home page
https://running-page.vercel.app
MIT License
3.41k stars 978 forks source link

Bug: garmin_sync crash with --fit #584

Closed NaturezzZ closed 6 months ago

NaturezzZ commented 6 months ago

When synchronizing FIT from Garmin, it sucessfully downloads FIT activities but crashes when generating track info. FYI, some activities are treadmill running / trail running. There are also a lot of errors when loading FIT with fit-tool. I suggest to load .fit with garmin-fit-sdk instead. ref: https://developer.garmin.com/fit/example-projects/python/

Error log snippet:

Something went wrong when loading FIT. for file 270504327.fit, we just ignore this file and continue
'utf-8' codec can't decode byte 0xc9 in position 49: invalid continuation byte
Something went wrong when loading FIT. for file 244180517.fit, we just ignore this file and continue
list index out of range
Something went wrong when loading FIT. for file 270033973.fit, we just ignore this file and continue
'utf-8' codec can't decode byte 0xc9 in position 49: invalid continuation byte
Something went wrong when loading FIT. for file 280518961.fit, we just ignore this file and continue
list index out of range
Something went wrong when loading FIT. for file 269049239.fit, we just ignore this file and continue
'utf-8' codec can't decode byte 0xc9 in position 49: invalid continuation byte
Something went wrong when loading FIT. for file 261396599.fit, we just ignore this file and continue
54 is not a valid Sport
ben-29 commented 6 months ago

Can the corresponding GPX file be synced properly? If so, perhaps we should consider switching to the garmin-fit-sdk.

NaturezzZ commented 6 months ago

GPX is okay. Can you reproduce this bug?

ben-29 commented 6 months ago

@NaturezzZ Can you assist me in testing the PR #590 to check if it resolved the issue?

NaturezzZ commented 6 months ago

Yes, let me take a look.