Comments (10)
See my comment above, it is line 354 now (the "projectNumber," line).
from fitbit-googlefit.
I had some success manually deleting the DataSource (works on next run after this):
curl --header "Authorization: Bearer ya29.SECRETHERE" -X DELETE \
--header "Content-Type: application/json;encoding=utf-8" \
"https://www.googleapis.com/fitness/v1/users/me/dataSources/raw:com.google.body.fat.percentage:fitbit:aria:io.pkp.fbit-gfit"
But then I'm running into errors about:
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/fitness/v1/users/me/dataSources/raw%3Acom.google.weight%3AXXXXXXXX%3Afitbit%3Aaria%3Aio.pkp.fbit-gfit/datasets/1519720264000000000-1519720264000000110?alt=json returned "Unable to fetch DataSource for Dataset: raw:com.google.weight:312047935529:fitbit:aria:io.pkp.fbit-gfit">
Though if I manually issue the curl request, it completes successfully. So either Google's API is having issues or the python wrapper is buggy it would seem? I'm not sure.
from fitbit-googlefit.
Alright, after a bunch more debugging... open up convertors.py
and comment out line 355:
- projectNumber,
+ #projectNumber,
Looking at Google Fit on my phone after, I can see that weight definitely has synced (that's the only one I tried).
from fitbit-googlefit.
No idea why this works... their API docs seem to say this should not work, but it obviously does.
from fitbit-googlefit.
@ericzinnikas Thanks for digging in. Sorry, I didn't get a chance to look into this lately. I will find a proper fix when I revisit the project.
from fitbit-googlefit.
Thx for the help, I will try that as soon as possible !
from fitbit-googlefit.
This totally solves the problem without even delete the previous element
from fitbit-googlefit.
my line 355 in converters.py are:
dataSource['device']['manufacturer'],
But I am getting the same error, any good suggestions?
from fitbit-googlefit.
I've got the same error.
Traceback (most recent call last):
File "/Users/theovandersluijs/PycharmProjects/fitbit-googlefit/remote.py", line 122, in CreateGoogleFitDataSource
dataSourceId=self.convertor.GetDataSourceId(dataType)).execute()
File "/Users/theovandersluijs/PycharmProjects/fitbitenv/lib/python3.6/site-packages/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/theovandersluijs/PycharmProjects/fitbitenv/lib/python3.6/site-packages/googleapiclient/http.py", line 840, 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%3A984249661236%3Afitbit%3Acharge-hr%3Aio.pkp.fbit-gfit?alt=json returned "DataSourceId not found: raw:com.google.step_count.delta:984249661236: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 110, in <module>
main()
File "app.py", line 60, in main
remote.CreateGoogleFitDataSource(dataType)
File "/Users/theovandersluijs/PycharmProjects/fitbit-googlefit/remote.py", line 129, in CreateGoogleFitDataSource
body=self.convertor.GetDataSource(dataType)).execute()
File "/Users/theovandersluijs/PycharmProjects/fitbitenv/lib/python3.6/site-packages/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/theovandersluijs/PycharmProjects/fitbitenv/lib/python3.6/site-packages/googleapiclient/http.py", line 840, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 409 when requesting https://www.googleapis.com/fitness/v1/users/me/dataSources?alt=json returned "Data Source: raw:com.google.step_count.delta:fitbit:charge-hr:io.pkp.fbit-gfit already exists">
from fitbit-googlefit.
Resolved in #58
from fitbit-googlefit.
Related Issues (20)
- Sleep not syncing
- Docker build fails
- Update README on Google API
- Unchecked items HOT 1
- 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.