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

NameError: name 'googleClient' is not defined #6

Closed
perdidohate opened this issue Aug 22, 2016 · 5 comments
Closed

NameError: name 'googleClient' is not defined #6

perdidohate opened this issue Aug 22, 2016 · 5 comments

Comments

@perdidohate
Copy link

perdidohate commented Aug 22, 2016

Good day, in first place thanks for this piece of software.

When i launch "python3 app.py -s 2016-08-15 -e 2016-08-21"

it returns this:

` File "/home/perdido/programmi/fitbit-googlefit-master/remote.py", line 102, in CreateGoogleFitDataSource
dataSourceId=self.convertor.GetDataSourceId(dataType)).execute()
File "/usr/local/lib/python3.5/dist-packages/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/usr/local/lib/python3.5/dist-packages/googleapiclient/http.py", line 838, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 404 when requesting https://www.googleapis.com/fitness/v1/users/me/dataSources/raw%3Acom.google.step_count.delta%3A676930878379%3Afitbit%3Acharge-hr%3Aio.pkp.fbit-gfit?alt=json returned "DataSourceId not found: raw:com.google.step_count.delta:676930878379:fitbit:charge-hr:io.pkp.fbit-gfit">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "app.py", line 96, in
main()
File "app.py", line 52, in main
remote.CreateGoogleFitDataSource(dataType)
File "/home/perdido/programmi/fitbit-googlefit-master/remote.py", line 107, in CreateGoogleFitDataSource
googleClient.users().dataSources().create(
NameError: name 'googleClient' is not defined
`
I've got the two files correctly for the auth2 api usage, but i've just setup the google fit account.
i need to do something to inizialize? i've run through the setup, enable everything it asks me to enable and set up an objective, is it enough?
Because it seems a call to something that not exist related to google fit... but maybe i'm wrong

Thanks

@perdidohate
Copy link
Author

probably a problem with authentication. I' ll try a little harder to solve this

@pkpio
Copy link
Owner

pkpio commented Aug 22, 2016

@perdidohate , It was my mistake. I restructured the code a few commits ago and this part of the code was never tested from my account. Will push a fix in 5 mins.

@pkpio pkpio reopened this Aug 22, 2016
pkpio added a commit that referenced this issue Aug 22, 2016
@pkpio pkpio closed this as completed Aug 22, 2016
@pkpio
Copy link
Owner

pkpio commented Aug 22, 2016

@perdidohate , Try now!

@perdidohate
Copy link
Author

it works perfectly!
Thank you very much for the quick fix

@pkpio
Copy link
Owner

pkpio commented Aug 22, 2016

Glad it did! Consider giving a star if you find it useful 😄

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

2 participants