Closed jmrnilsson closed 3 years ago
I hit the following failure state on all my Garmin Forerunner 245 Music, and some of my Garmin Forerunner 210 fit files. Unknown if Garmin 245 Music previously had this issue.
Can you share some .fit binaries from these devices? Even a 2-second-long empty activity should suffice.
if header_data[8:12] != b'.FIT': raise FitHeaderError("Invalid .FIT File Header")
This header is a very basic fundamental part of the .fit format, and I don't understand how it could diverge on such a common Garmin device. :man_shrugging:
Yeah. I suppose. Though I have some few things to reinstall. Give me a few days.
I’ve been looking into this. But with a lot of changes in my own code and different version of fitparse. It doesn’t seem like I have this issue anymore.
You could probably close this issue for now, and I can repost if anything shows again.
TL;DR I’m did some weird work around the file handle since I want to use streaming requests behind Flask. This might very well have messed with encoding or something else.
I hit the following failure state on all my Garmin Forerunner 245 Music, and some of my Garmin Forerunner 210 fit files. Unknown if Garmin 245 Music previously had this issue. But there has been firmware updates for this device recently.
https://github.com/dtcooper/python-fitparse/blob/798035875da1692e3165cc15319380967fa6b812/fitparse/base.py#L105
Version: Pypi
fitparse==1.1.0
Thanks for the excellent library 🥇. These binary formats are a real head-scratchers.