Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when updating profile version #73

Open
pokey opened this issue Jun 26, 2018 · 5 comments
Open

Error when updating profile version #73

pokey opened this issue Jun 26, 2018 · 5 comments

Comments

@pokey
Copy link

pokey commented Jun 26, 2018

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

@xmedeko
Copy link
Contributor

xmedeko commented Jul 19, 2018

See PR #74 is has SDK 20.66.

@pokey
Copy link
Author

pokey commented Jul 19, 2018

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

@polyvertex
Copy link
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

@pokey
Copy link
Author

pokey commented Aug 3, 2018

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

@lin826
Copy link

lin826 commented Sep 1, 2018

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants