Issue with end of file parsing
I am attempting to use fitparse to pull data from a RunScribe .fit file, and am running into an error at the end of the file: fitparse.utils.FitEOFError: Tried to read 2 bytes from .FIT file but got 1
I do not run into this issue with a Garmin .fit file. I'm using Python 3.7 on Windows 10 (64-bit) and I've attached the simplest version of the files that I believe will recreate the error.
Please let me know if there's any simple resolution to this issue, thank you!
I too am having this exact issue.
I don't know what to make of that file - it's almost like it's corrupt or missing some data somehow. I see a file_id definition, a file_id data record (which looks fine), 5 unknown definitions, then everything else is an unknown record with unknown data in it until it errors out.
Does it parse with the FIT SDK from Garmin?
I have written a patch with fault-tolerance for improperly terminated files. Your sample files seem to have missing header definitions, which means you cannot parse the file. I will see what I can find. https://github.com/fundthmcalculus/python-fitparse/tree/unterminated-file-fix