Closed letsid closed 3 years ago
I got the same error, seems to be caused by code in CheckDataSource BS440google.py? When the data source does not exist, it should be created by the last line in the function, but the indentation of this line seems to be wrong, when shifing the line to the "left" it works for me! (you could also add a else: clause)
There are some upcoming changes to the Google Fit API, but they will not be enforced by april 2021. I will make a separate issue for that as a reminder. The suggestion of @rojong makes perfectly sense. If the datasource exists (probably in my case) it doesn't need to create one. However if it doesn't exist it needs to create one but this will never be executed. I've pushed the fix. Could you try?
Hi,
Thanks @rojong and @keptenkurk Issue is fixed!
Great to hear that! Happy weighing :-)
Hi, I am trying to sync my data to google fit but i get this erro
Tue, 03 Nov 2020 11:45:00 DEBUG method URL being requested: PATCH https://fitness.googleapis.com/fitness/v1/users/me/dataSources/raw%3Acom.google.weight%[removed]%3Aunknown%3Aunknown%3A10000001/datasets/[removed]?alt=json Tue, 03 Nov 2020 11:45:00 ERROR execute Unable to update Google Fit: Error sending data. Tue, 03 Nov 2020 11:45:00 INFO execute Finished plugin: BS440google
as this error is a bit generic I am unsure what is wrong.
It is probably something with the API I think. I can see fails in the API dashboard I can see that there are connections made but the api calls have an error. I can not see what the error is
also:
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery_cache/init.py", line 44, in autodetect from . import file_cache File "/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in
"file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth"
ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth
Tue, 03 Nov 2020 13:21:05 DEBUG _retrieve_discovery_doc URL being requested: GET https://www.googleapis.com/discovery/v1/apis/fitness/v1/rest
Tue, 03 Nov 2020 13:21:06 INFO GetGoogleClient Google client created
Tue, 03 Nov 2020 13:21:06 INFO AddGoogle Created a new dataset: 1604406066096899072-1604406066096914176
Tue, 03 Nov 2020 13:21:06 DEBUG method URL being requested: GET https://fitness.googleapis.com/fitness/v1/users/me/dataSources/raw%3Acom.google.weight%3A200408753893%3Aunknown%3Aunknown%3A10000001?alt=json
Tue, 03 Nov 2020 13:21:06 INFO new_request Refreshing due to a 401 (attempt 1/2)
Tue, 03 Nov 2020 13:21:06 INFO _do_refresh_request Refreshing access_token
Tue, 03 Nov 2020 13:21:06 INFO AddGoogle Data Source ID: raw:com.google.weight:200408753893:unknown:unknown:10000001
Tue, 03 Nov 2020 13:21:06 DEBUG method URL being requested: PATCH https://fitness.googleapis.com/fitness/v1/users/me/dataSources/raw%3Acom.google.weight%3A200408753893%3Aunknown%3Aunknown%3A10000001/datasets/1604406066096899072-1604406066096914176?alt=json