Git Product home page Git Product logo

Comments (9)

benvaughan avatar benvaughan commented on July 18, 2024 1

That did it! Working now so it must have been the whitespace issue. Thanks for all your efforts lightmaster, very appreciated!

from fitbit-googlefit.

lightmaster avatar lightmaster commented on July 18, 2024

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.

benvaughan avatar benvaughan commented on July 18, 2024

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.

lightmaster avatar lightmaster commented on July 18, 2024

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.

lightmaster avatar lightmaster commented on July 18, 2024

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.

lightmaster avatar lightmaster commented on July 18, 2024

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.

benvaughan avatar benvaughan commented on July 18, 2024

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.

lightmaster avatar lightmaster commented on July 18, 2024

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.

lightmaster avatar lightmaster commented on July 18, 2024

I just pushed a new update that automatically strips out any leading and trailing whitespaces.

from fitbit-googlefit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.