dtcooper / python-fitparse

Python library to parse ANT/Garmin .FIT files
http://pythonhosted.org/fitparse/
MIT License
738 stars 184 forks source link

How to mitigate the FitParseError throwing for a bad index? #96

Open woodmicha opened 5 years ago

woodmicha commented 5 years ago

I'm getting this exception for a few users in their Fit files:

FitParseError("No such dev_data_index=%s found" % (dev_data_index))

Looks like it's related to Battery Level and the dev_data_index is 0.

<DataMessage: field_description (#206) -- local mesg: #3, fields: [field_name: Battery level, units: %, fit_base_unit_id: None, native_mesg_num: record, developer_data_index: 0, field_definition_number: 0, fit_base_type_id: float32, scale: None, offset: None, native_field_num: None]>

Thanks in advance for any suggestions.

polyvertex commented 5 years ago

It would be interesting to analyze these files but I guess you cannot share them?

woodmicha commented 5 years ago

Unable to share files due to PII. Perhaps someone could share if this is a fatal error or if it's something that allows the files to be parsed in spite of the error?