Closed thundercatsNZ closed 3 years ago
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']))
This revert 6c095dacf2c190aec341bd6249c524b3eefd65c5 commit. But the issue #57 it will be open again.
What do you think?
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.
I have the same problem, 403... :/
I believe this issue should be resolved by the recent changes in the repo. Please reopen if not.
Hi, I get the following error when executing:
Any idea what I have configured incorrectly?
Thanks!
Paul