I see you are using an older version with a wrong url builtin to connect to the fitbit server. The url should be corrected to client.fitbit.com. Either use a newer version (0.5.1) or modify the url in the code.
-----
I followed his instructions and now I can sync the device.
------
Thank you very much, now it is working. This is what I did, step by step:
$ cd /usr/lib/python3/dist-packages/galileo/
$ sudo grep -rl "api.fitbit.com" ./
./main.py
./__pycache__/main.cpython-35.pyc
$ sudo vim main.py
on line 37:
galileo = GalileoClient('https', 'api.fitbit.com', 'tracker/client/message')
I made the suggested change, so now it is:
galileo = GalileoClient('https', 'client.fitbit.com', 'tracker/client/message')
The saved the file.
------
So, please, could you check on this and update the package to its latest version, so everyone can benefit.
I did report the bug to the developer, you can read it here:
https:/ /bitbucket. org/benallard/ galileo/ issues/ 311/a-serious- error-happened- which-is- probably
Now I copy the information of the link above, here:
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- 259:CRITICAL: # A serious error happened, which is probably due to a 260:CRITICAL: # programming error. Please open a new issue with the following 260:CRITICAL: # information on the galileo bug tracker: 260:CRITICAL: # https:/ /bitbucket. org/benallard/ galileo/ issues/ new 262:CRITICAL: # /usr/bin/galileo: 0.5 263:CRITICAL: # Last communications: 263:CRITICAL: # < 20 01 54 65 72 6D 69 6E 61 74 65 4C 69 6E 6B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 263:CRITICAL: # < 263:CRITICAL: # > 02 01 263:CRITICAL: # < 16 08 02 05 65 9E A6 84 BE C4 74 04 00 20 00 00 FF E7 01 00 02 00 00 00 00 00 00 00 00 00 00 00 263:CRITICAL: # > 1A 04 BA 56 89 A6 FA BF A2 BD 01 46 7D 6E 00 00 AB AD 00 FB 01 FB 02 FB A0 0F 263:CRITICAL: # < 20 01 53 74 61 72 74 44 69 73 63 6F 76 65 72 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 263:CRITICAL: # < 13 03 B4 37 13 FE 7D F5 01 D5 06 12 04 CD 92 00 00 00 FB 00 00 00 00 00 00 00 00 00 00 00 00 00 263:CRITICAL: # < 03 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 263:CRITICAL: # > 02 05 263:CRITICAL: # < 20 01 43 61 6E 63 65 6C 44 69 73 63 6F 76 65 72 79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 263:CRITICAL: # python3/ dist-packages/ galileo/ main.py" , line 288, in main mode](config) python3/ dist-packages/ galileo/ main.py" , line 193, in sync (config) : python3/ dist-packages/ galileo/ main.py" , line 71, in syncAllTrackers requestStatus( not config.httpsOnly): python3/ dist-packages/ galileo/ net.py" , line 187, in requestStatus post('status' ) python3/ dist-packages/ galileo/ net.py" , line 134, in post for_status( ) python3/ dist-packages/ requests/ models. py", line 844, in raise_for_status http_error_ msg, response=self) exceptions. HTTPError: 401 Client Error: Unauthorized for url: https:/ /api.fitbit. com:443/ tracker/ client/ message
-------
$ sudo galileo
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
# Python: 3.5.2+ (default, Sep 22 2016, 12:18:14) [GCC 6.2.0 20160927]
# Platform: Linux willy 4.8.0-31-generic #33-Ubuntu SMP Wed Dec 7 15:14:02 UTC 2016 x86_64 x86_64
# pyusb: 1.0.0
# requests: 2.10.0
# yaml: 3.11 (with libyaml)
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
2016-12-14 11:24:29,
Traceback (most recent call last):
File "/usr/lib/
}[config.
File "/usr/lib/
for tracker in syncAllTrackers
File "/usr/lib/
if not galileo.
File "/usr/lib/
self.
File "/usr/lib/
r.raise_
File "/usr/lib/
raise HTTPError(
requests.
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -----
-------
The response for the developer Benoît Allard is:
I see you are using an older version with a wrong url builtin to connect to the fitbit server. The url should be corrected to client.fitbit.com. Either use a newer version (0.5.1) or modify the url in the code.
-----
I followed his instructions and now I can sync the device.
------
Thank you very much, now it is working. This is what I did, step by step:
$ cd /usr/lib/ python3/ dist-packages/ galileo/ _/main. cpython- 35.pyc
$ sudo grep -rl "api.fitbit.com" ./
./main.py
./__pycache_
$ sudo vim main.py
on line 37: 'https' , 'api.fitbit.com',
'tracker/ client/ message' )
galileo = GalileoClient(
I made the suggested change, so now it is: 'https' , 'client. fitbit. com',
'tracker/ client/ message' )
galileo = GalileoClient(
The saved the file.
------
So, please, could you check on this and update the package to its latest version, so everyone can benefit.
Thank you very much.
Eduardo