You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to parse a Zwift fit file from an activity in progress, and I'm not having any luck with it. I fear Zwift isn't writing a valid file at this point, but is there something else going on?
In my code, I'm opening up the file just like your example:
withfitdecode.FitReader(in_progress_file) asfit:
Error:
(venv) C:\Users\user\Documents\project\src>python project.py
DEBUG:Located in progress fit file: C:\Users\user\Documents\Zwift\Activities\inProgressActivity.fit
Traceback (most recent call last):
File "C:\Users\user\Documents\project\venv\lib\site-packages\fitdecode\reader.py", line 645, in _read_data_message
def_mesg = self._local_mesg_defs[record_header.local_mesg_num]
KeyError: 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Documents\project\src\project.py", line 97, in <module>
z.run()
File "C:\Users\user\Documents\project\src\project.py", line 85, in run
for record in records:
File "C:\Users\user\Documents\project\venv\lib\site-packages\fitdecode\reader.py", line 232, in __iter__
yield from self._read_next()
File "C:\Users\user\Documents\project\venv\lib\site-packages\fitdecode\reader.py", line 363, in _read_next
record = self._read_record()
File "C:\Users\user\Documents\project\venv\lib\site-packages\fitdecode\reader.py", line 530, in _read_record
message = self._read_data_message(chunk, record_header)
File "C:\Users\user\Documents\project\venv\lib\site-packages\fitdecode\reader.py", line 647, in _read_data_message
raise FitParseError(
fitdecode.exceptions.FitParseError: FIT parsing error @ 167: local message 2 not defined
The text was updated successfully, but these errors were encountered:
I'm trying to parse a Zwift fit file from an activity in progress, and I'm not having any luck with it. I fear Zwift isn't writing a valid file at this point, but is there something else going on?
Source File from 5 minute ride: inProgressActivity.zip
fittxt output: fittxt_out.txt
In my code, I'm opening up the file just like your example:
Error:
The text was updated successfully, but these errors were encountered: