Comments (9)
That did it! Working now so it must have been the whitespace issue. Thanks for all your efforts lightmaster, very appreciated!
from fitbit-googlefit.
Make sure you set it up in a virtualenv, and then run it with out sudo.
Also, I've created a fork of this report that automates the setup and everything as much as possible. You still have to copy/paste the URLs on a headless computer, but you don't have to worry about mistyping any commands. Clone it into a different folder and see if it runs fine for you. https://github.com/lightmaster/fitbit-googlefit
from fitbit-googlefit.
Thanks for the response lightmaster. I did set it up within a virtualenv environment and I did run it without sudo without success.
I have tried your fork however I am getting the following error after I input the fitbit secret:
Traceback (most recent call last):
File "app.py", line 198, in
main()
File "app.py", line 103, in main
subprocess.run("cd ./auth && ./auth_fitbit.py -i " + fitbitclientid + " -s " + fitbitclientsecret + " --console", shell=True)
AttributeError: 'module' object has no attribute 'run'
The only change I made to your README instructions was in the 'Run App.py' section I cloned your fork rather than the this version as your instructions suggested. I assumed this was a cut/paste error, i.e. you forgot to update the address to your fork. Was I wrong about that?
from fitbit-googlefit.
Module object has no attribute run means you're probably running python3 version lower than 3.5. gotta find a different command that works nicely that works on a lower version.
My fork is intended to be pulled back into this one once I'm sure it works on all platforms. Need to change that part of the README.md to just say to use the green button at the top though so it works for both.
from fitbit-googlefit.
Give me a little bit and I'll write that section with a different command that should work on lower versions of Python3.
from fitbit-googlefit.
Pull the repo again with git pull
and try running it again. I changed the subprocess.run command to subprocess. call which should work on python3.4 that you're running.
from fitbit-googlefit.
Thanks again for your help lightmaster, and my apologies for not realising I was running a lower version of python3. I pulled your update and fitbit verfication worked fine. Google verification hit a snag however. I got a verfication code from Google but when I enter it I get the following error:
Enter verification code: Verification code from google
Authentication has failed: invalid_clientThe OAuth client was not found.
Traceback (most recent call last):
File "app.py", line 198, in
main()
File "app.py", line 130, in main
fitbitClient,googleClient = helper.GetFitbitClient(),helper.GetGoogleClient()
File "/home/pi/Documents/fitbit-googlefit/helpers.py", line 38, in GetGoogleClient
http = credentials.authorize(httplib2.Http())
AttributeError: 'NoneType' object has no attribute 'authorize'
Is this another side-effect of me running the wrong python3 version?
from fitbit-googlefit.
The subprocess.run command was the only part that required 3.5. Since I replaced that with subprocess.call, it should work on 3.4 with no problem.
Make sure there's no white spaces in the client id and secret from Google. Apparently Google's copy button adds a leading and trailing whitespace to both.
from fitbit-googlefit.
I just pushed a new update that automatically strips out any leading and trailing whitespaces.
from fitbit-googlefit.
Related Issues (20)
- Sleep not syncing
- Docker build fails
- Update README on Google API
- Unchecked items HOT 1
- Error during first usage of the app HOT 10
- Exercise distance not sync'd HOT 1
- Instructions for creating FitBit app aren't quite correct HOT 2
- Instructions for creating Google project and credentials are not quite correct HOT 2
- Google API client error at first run HOT 2
- Data Source: raw:com.google.step_count.delta:fitbit:charge-hr:io.pkp.fbit-gfit already exists HOT 4
- Filter Driving activities HOT 1
- Error on running script HOT 5
- Google Fit Sync Error 403 -- "Application Package Name Provided By un-Trusted Source" HOT 4
- DataPoint out of range: com.google.step_count.delta HOT 2
- How to save fitbit data in json or csv file on computer, instead of uploading to Google Fit Cloud? HOT 3
- Issue with auth_fitbit.py
- MarkupSafe needs to be updated in requirements.txt
- Error on adding points to a dataset: Invalid arguments HOT 3
- Can't run the app.py
- "Data Source: already exists" Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fitbit-googlefit.