Skip to content

Error when updating profile version #73

Open

Description

@pokey

When trying to update the sdk version to 20.66.00, I get the following error:

> python scripts/generate_profile.py /path/to/fit-sdk.zip fitparse/profile.py
Traceback (most recent call last):
  File "scripts/generate_profile.py", line 548, in <module>
    main(xls, profile)
  File "scripts/generate_profile.py", line 506, in main
    xls_file, profile_version = get_xls_and_version_from_zip(input_xls_or_zip)
  File "scripts/generate_profile.py", line 486, in get_xls_and_version_from_zip
    archive.open('c/fit.h').read().decode(),
  File "/Users/pokey/.pyenv/versions/3.6.5/lib/python3.6/zipfile.py", line 1352, in open
    zinfo = self.getinfo(name)
  File "/Users/pokey/.pyenv/versions/3.6.5/lib/python3.6/zipfile.py", line 1281, in getinfo
    'There is no item named %r in the archive' % name)
KeyError: "There is no item named 'c/fit.h' in the archive"

I believe this is because the desired path is actually not at the root of the zip, but rather just below the top-level FitSDKRelease_20.66.00 directory

Activity

  1. xmedeko commented on Jul 19, 2018

    @xmedeko
    Contributor

    See PR #74 is has SDK 20.66.

  2. pokey commented on Jul 19, 2018

    @pokey
    Author

    Maybe I'm missing something in that PR, but I don't believe that fixes the problem at hand, which I believe will continue to be a problem when someone tries to update profile.py again based on a newer version of the SDK

  3. polyvertex commented on Jul 19, 2018

    @polyvertex
    Contributor

    I do not have any issue with generate_profile.py. Perhaps it's because I have the zip archive in the same directory?

    $ python generate_profile.py FitSDKRelease_20.66.00.zip profile.py
    
  4. pokey commented on Aug 3, 2018

    @pokey
    Author

    Hmm just tried that, and still got the same error message

  5. lin826 commented on Sep 1, 2018

    @lin826

    Replace two files' names in scripts/generate_profile.py may help.
    'c/fit.h' to 'FitSDKRelease_xx.xx.00/c/fit.h'
    'Profile.xls' to 'FitSDKRelease_xx.xx.00/Profile.xls'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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