Comments (5)
The problem is with the IDs that the project generates. Google requires that they are formatted like:
type:dataType.name:developer-project-number:device.manufacturer:device.model:device.uid:dataStreamName
reference
but the code doesn't include the project number.
You can get your project number in the Google Developers Console in a spot like:
https://console.developers.google.com/iam-admin/settings?project=
Assuming your project id was: 123456789012
, you can fix the code by modifying the end of converters.py
Change it from:
return ':'.join((
dataSource['type'],
dataSource['dataType']['name'],
dataSource['device']['manufacturer'],
dataSource['device']['model'],
dataSource['device']['uid']))
to
return ':'.join((
dataSource['type'],
dataSource['dataType']['name'],
'123456789012',
dataSource['device']['manufacturer'],
dataSource['device']['model'],
dataSource['device']['uid']))
from fitbit-googlefit.
This revert 6c095da commit.
But the issue #57 it will be open again.
What do you think?
from fitbit-googlefit.
The commit you referenced is cleaner than my way, and doesn't require user interaction to modify the config.
When I ran the code in master branch, it generated:
raw:com.google.step_count.delta:<obfuscated-projec-number>:fitbit:charge-hr:<obfuscated-uid>
I could see them by going to:
https://developers.google.com/apis-explorer/#search/fitness.users.datasources.list/m/fitness/v1/fitness.users.dataSources.list?userId=me
I'm not sure how it got created to cause the error on the first run of the code, but for all later runs, it failed because the DataSourceId generated wasn't correct, so it can't find it, and it tries to create it again.
from fitbit-googlefit.
I have the same problem, 403... :/
from fitbit-googlefit.
I believe this issue should be resolved by the recent changes in the repo. Please reopen if not.
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
- 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.