Skip to content

Fails parse of developer_data_id record without application_id #35

@Tigge

Description

@Tigge

When trying to parse a fit file I'm running into trouble. This is what I get back running fitdump on master:

Traceback (most recent call last):
  File "./scripts/fitdump", line 92, in <module>
    main()
  File "./scripts/fitdump", line 86, in main
    for n, message in enumerate(messages, 1):
  File "/media/BigHDD/Home stuff/Dropbox/Dropbox/Personal/Programming/python-fitparse/fitparse/base.py", line 450, in get_messages
    message = self._parse_message()
  File "/media/BigHDD/Home stuff/Dropbox/Dropbox/Personal/Programming/python-fitparse/fitparse/base.py", line 163, in _parse_message
    add_dev_data_id(message)
  File "/media/BigHDD/Home stuff/Dropbox/Dropbox/Personal/Programming/python-fitparse/fitparse/records.py", line 367, in add_dev_data_id
    application_id = message.get('application_id').raw_value
AttributeError: 'NoneType' object has no attribute 'raw_value'

I believe this is due to fitparse trying to read a nonexisting field in a developer_data_id record. This file has only the developer_data_index and not application_id which fitparse seems to always want to read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions