myfitbit icon indicating copy to clipboard operation
myfitbit copied to clipboard

changes to make it work for me

Open maplebed opened this issue 4 years ago • 1 comments

Thank you for providing this little app - you let me rescue 9 years of weight data that was trapped in Fitbit's storage.

I had to make a few changes to get it to run for me. I'm not well versed in current python; I don't know if some of these were issues with my environment vs. things that actually needed to be fixed.

Change list:

The readme indicated port 8189 but the code used 18189. This mismatch caused oauth to fail to complete the handshake or handoff or something and the program aborted. I suspect changing either the README and app registration with fitbit or the actual listener would work; since I had already configured the app changing the listening port seemed easier.

Calls to the webbrowser and urllib in auth.py were failing because they couldn't be found. Importing them resolved that issue.

The access token I got from fitbit did not have a time field, only something about the duration for which it would be valid. I wasn't sure what sort of validation would be useful so I just skipped validation entirely.

I appreciate the "TODO use profile['memberSince']" note - I wanted to download weight data since 2011 so I changed the constant. whomp whomp, works for me. ;)

maplebed avatar Dec 28 '20 00:12 maplebed

Thanks for the feedback, I'm glad it was useful.

I'll look into your changes and try to see what went wrong.

Knio avatar Dec 28 '20 23:12 Knio