This repo is the home of the official Azure DevOps documentation for Microsoft. GitHub Issues filed in this repository should be for problems with the documentation.
A simple Node.js ORM for PostgreSQL, MySQL and SQLite3 built on top of Knex.js
The default personal blogging theme for Ghost
MartinCa/galaxy-integration-steam 0
Integration with Steam for Galaxy
MartinCa/Steam-Library-Manager 0
Open source utility to manage Steam, Origin and Uplay libraries in ease of use with multi library support
Source code for the syncmarx web extension
Typo is the oldest and most powerful Ruby on Rails blogware, providing custom templates, powerful drag and drop plugins API, advanced SEO capabilities, XMLRPC API and many more.
issue commentjaroslawhartman/withings-sync
Update to 3.3.0 causes withings auth to fail
Can you try #36 plz?
I can confirm this patch results in a working sync. Thanks!
comment created time in 11 days
pull request commentjaroslawhartman/withings-sync
I applied this patch to the docker image and it works now as expected
comment created time in 11 days
issue commentjaroslawhartman/withings-sync
Update to 3.3.0 causes withings auth to fail
Can you try https://github.com/jaroslawhartman/withings-sync/pull/36 plz?
comment created time in 11 days
PR opened jaroslawhartman/withings-sync
The new endpoint needs an additional parameter 'action' to work properly.
pr created time in 11 days
issue commentjaroslawhartman/withings-sync
Update to 3.3.0 causes withings auth to fail
Thats strange. Error 2554 stands for "Not implemented".
I dont get why they return this error.
comment created time in 11 days
issue commentjaroslawhartman/withings-sync
Update to 3.3.0 causes withings auth to fail
There was definitely a change made to the withings2.py code to prepare for a switchover by withings to a new auth style mentioned in ticket #34
I wonder if withings isn't ready for this switch yet on all accounts (wild guess)
comment created time in 11 days
issue openedjaroslawhartman/withings-sync
Update to 3.3.0 causes withings auth to fail
After upgrading the docker image to the latest v3.3.0 release. I get an error code 2554 from withings reported on the command line. Here is the output I get when starting the docker
docker start -i withings
2021-06-04 11:39:48,502 - withings - ERROR - Can't read config file /root/.withings_user.json
2021-06-04 11:39:48,502 - withings - WARNING - User interaction needed to get Authentification Code from Withings!
2021-06-04 11:39:48,502 - withings - WARNING -
2021-06-04 11:39:48,502 - withings - WARNING - Open the following URL in your web browser and copy back the token. You will have *30 seconds* before the token expires. HURRY UP!
2021-06-04 11:39:48,502 - withings - WARNING - (This is one-time activity)
2021-06-04 11:39:48,502 - withings - WARNING -
2021-06-04 11:39:48,502 - withings - INFO - https://account.withings.com/oauth2_user/authorize2?response_type=code&client_id=183e03e1f363110b3551f96765c98c10e8f1aa647a37067a1cb64bbbaf491626&state=OK&scope=user.metrics&redirect_uri=https://jaroslawhartman.github.io/withings-sync/contrib/withings.html&
2021-06-04 11:39:48,503 - withings - INFO -
Token : <copied_token_pasted_here>
2021-06-04 11:40:04,791 - withings - INFO - Get Access Token
2021-06-04 11:40:05,113 - withings - ERROR - Received error code: 2554
2021-06-04 11:40:05,113 - withings - ERROR - Check here for an interpretation of this error: http://developer.withings.com/api-reference#section/Response-status
2021-06-04 11:40:05,113 - withings - ERROR -
2021-06-04 11:40:05,114 - withings - ERROR - If it's regarding an invalid code, try to start the script again to obtain a new link.
Traceback (most recent call last):
File "/usr/local/bin/withings-sync", line 33, in <module>
sys.exit(load_entry_point('withings-sync==3.3.0', 'console_scripts', 'withings-sync')())
File "/usr/local/lib/python3.9/site-packages/withings_sync-3.3.0-py3.9.egg/withings_sync/sync.py", line 196, in main
sync(**vars(args))
File "/usr/local/lib/python3.9/site-packages/withings_sync-3.3.0-py3.9.egg/withings_sync/sync.py", line 78, in sync
withings = WithingsAccount()
File "/usr/local/lib/python3.9/site-packages/withings_sync-3.3.0-py3.9.egg/withings_sync/withings2.py", line 162, in __init__
self.withings = WithingsOAuth2()
File "/usr/local/lib/python3.9/site-packages/withings_sync-3.3.0-py3.9.egg/withings_sync/withings2.py", line 66, in __init__
self.getAccessToken()
File "/usr/local/lib/python3.9/site-packages/withings_sync-3.3.0-py3.9.egg/withings_sync/withings2.py", line 127, in getAccessToken
self.user_config['access_token'] = body.get('access_token')
AttributeError: 'NoneType' object has no attribute 'get'
created time in 11 days
issue commentjaroslawhartman/withings-sync
Tried to run it on the Raspberry 3b. Unfortunately without much success (which is likely due to my lack of docker knowledge...)
comment created time in 12 days
issue commentjaroslawhartman/withings-sync
sorry, really didn't see it when I checked.
comment created time in 12 days
issue commentjaroslawhartman/withings-sync
I havnt manage to build the image actually with that script. Somehow my Docker setup is broken.
Can somebody else test the contrib/do_release.sh script?
comment created time in 12 days
push eventjaroslawhartman/withings-sync
commit sha 763a926a43d48789eac4723aec40e149291d8409
Add support for building cross-platform docker images Closes #15
commit sha 148d4811c2608fcff61996106f62e7de06c8d3a3
fix installation of lxml in Docker
commit sha c434ca9c10fdde8b711ac69d25d7ed03f07e06b2
bump version
commit sha 7335469523a82e7a199326b99da7d9618710a6a1
Merge branch 'cross-platform-docker-build'
push time in 12 days
issue closedjaroslawhartman/withings-sync
I'm trying to get some automation set up on my raspberry pi 4 and when I try to run the docker container I get the following error:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested standard_init_linux.go:219: exec user process caused: exec format error
Is there a way to get this program to play well with docker and kubernetes on the Pi? My current "automation" is running the docker task through windows powershell with the schedule manager which isn't exactly an elegant solution.
closed time in 12 days
DoctorEwissue closedjaroslawhartman/withings-sync
Hi,
When doing pip install withings-sync, I get the following error:
Could not find a version that satisfies the requirement requestscloudscraper (from withings-sync) (from versions: ) No matching distribution found for requestscloudscraper (from withings-sync)
Admittedly new at this, so hopefully I'm not doing something wrong, but from the changelog it looks like you have been working on cloudscraper stuff recently, so I thought this may be relevant.
closed time in 12 days
darrencopeissue commentjaroslawhartman/withings-sync
Fixed by e62bf29
comment created time in 12 days
issue closedjaroslawhartman/withings-sync
withings_sync.garmin.APIException: SSO error 401
2021-05-29 13:21:47,146 - withings - INFO - Refresh Access Token
2021-05-29 13:21:47,954 - withings - INFO - Get Measurements
2021-05-29 13:21:48,352 - root - INFO - No Trainerroad username or a new measurement - skipping sync
Traceback (most recent call last):
File "/usr/local/bin/withings-sync", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/withings_sync/sync.py", line 196, in main
sync(**vars(args))
File "/usr/local/lib/python3.8/dist-packages/withings_sync/sync.py", line 184, in sync
session = garmin.login(garmin_username, garmin_password)
File "/usr/local/lib/python3.8/dist-packages/withings_sync/garmin.py", line 156, in login
session = self._get_session(email=username, password=password)
File "/usr/local/lib/python3.8/dist-packages/withings_sync/garmin.py", line 93, in _get_session
raise APIException('SSO error %s %s' % (ssoResp.status_code, ssoResp.text))
withings_sync.garmin.APIException: SSO error 401 <!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<script charset='UTF-8' type="ebbd33b1756dc6ae370d3b32-text/javascript">
window['adrum-start-time'] = new Date().getTime();
(function(config){
config.appKey = 'AD-AAB-AAM-PWF';
config.adrumExtUrlHttp = 'http://cdn.appdynamics.com';
config.adrumExtUrlHttps = 'https://cdn.appdynamics.com';
config.beaconUrlHttp = 'http://col.eum-appdynamics.com';
config.beaconUrlHttps = 'https://col.eum-appdynamics.com';
config.xd = {enable : false};
})(window['adrum-config'] || (window['adrum-config'] = {}));
</script>
closed time in 12 days
midzelispush eventjaroslawhartman/withings-sync
commit sha 0cb7bf46b39da5a795e9ec0a801f057f687506cf
link Garmin SSO issue in README
push time in 12 days
push eventjaroslawhartman/withings-sync
commit sha 011247e9f5008229f29a75fa0413f7ca193e6fcb
add note about Garmin SSO errors
push time in 12 days
issue closedjaroslawhartman/withings-sync
withings_sync.garmin.APIException: SSO error 403
I'm getting the following response from Garmin's API after the initial token and refresh token are retrieved. It's been happening for a few days. I tried deleting my local user settings and re-generating the token but it still happens.
2021-05-20 13:02:51,344 - withings - INFO - https://account.withings.com/oauth2_user/authorize2?response_type=code&client_id=183e03e1f363110b3551f96765c98c10e8f1aa647a37067a1cb64bbbaf491626&state=OK&scope=user.metrics&redirect_uri=https://jaroslawhartman.github.io/withings-sync/contrib/withings.html&
2021-05-20 13:02:51,344 - withings - INFO -
Token : xxxxxxx
2021-05-20 13:03:12,438 - withings - INFO - Get Access Token
2021-05-20 13:03:12,955 - withings - INFO - Refresh Access Token
2021-05-20 13:03:15,149 - withings - INFO - Get Measurements
2021-05-20 13:03:15,641 - root - INFO - No Trainerroad username or a new measurement - skipping sync
Traceback (most recent call last):
File ".venv/bin/withings-sync", line 8, in <module>
sys.exit(main())
File ".venv/lib/python3.8/site-packages/withings_sync/sync.py", line 191, in main
sync(**vars(args))
File ".venv/lib/python3.8/site-packages/withings_sync/sync.py", line 179, in sync
session = garmin.login(garmin_username, garmin_password)
File ".venv/lib/python3.8/site-packages/withings_sync/garmin.py", line 156, in login
session = self._get_session(email=username, password=password)
File ".venv/lib/python3.8/site-packages/withings_sync/garmin.py", line 93, in _get_session
raise APIException('SSO error %s %s' % (ssoResp.status_code, ssoResp.text))
withings_sync.garmin.APIException: SSO error 403 <html lang="en-US" class="no-js" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>Garmin: Maintenance</title>
.....
<h1 class="app__heading">We’re sorry.</h1>
<p class="app__subheading">Something went wrong, and our site is temporarily unavailable.<br />We’re already working to get things back on course.</h2>
<div class="app__error__details">
<div class="cf-error-details cf-error-1020">
<h1>Access denied</h1>
<p>This website is using a security service to protect itself from online attacks.</p>
<ul class="cferror_details">
<li>Ray ID: xxxxxx</li>
<li>Timestamp: 2021-05-20 20:03:15 UTC</li>
<li>Your IP address: xxxxxx</li>
<li class="XXX_no_wrap_overflow_hidden">Requested URL: sso.garmin.com/sso/login?service=https%3A%2F%2Fconnect.garmin.com%2Fmodern&clientId=GarminConnect&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso&consumeServiceTicket=false </li>
<li>Error reference number: 1020</li>
<li>Server ID: FL_12F516</li>
<li>User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36</li>
</ul>
</div>
closed time in 12 days
seanhoughtonissue commentjaroslawhartman/withings-sync
withings_sync.garmin.APIException: SSO error 403
Seems like your IP has been blocked/banned by Cloudflare for security purposes:
This website is using a security service to protect itself from online attacks.
Garmin has put their Garmin Connect API behind Cloudflare for some weeks now.
I will close this issue and continue the discussion here #31
comment created time in 12 days
push eventjaroslawhartman/withings-sync
commit sha 3907095fe12fa73bbf1ef2aeac42ffc21e45ff58
Sleep around 3hrs between invocations to avoid API errors See also: #31
push time in 12 days
push eventjaroslawhartman/withings-sync
commit sha d732732e02714b8341420980851448e576cb8d71
run k8s-job obnly every 3rd hour to avoid API limits See #31
push time in 12 days
issue commentjaroslawhartman/withings-sync
withings_sync.garmin.APIException: SSO error 401
Thanks for the feedback @stynoo and @m3l7.
What works for me is to schedule the sync every 2hrs. For now that seems to be the sweet spot.
I will add a note to the README.
he scheduled script at 10:00 this morning bugged out with an SS0 403 error code. A manual run 40 minutes later ran successfully.
I would be nice if we could solve #3 . But I dont think Garmin really supports this currently.
Alternatively, we should probably also try to cache our Garmin tokens to avoid a new SSO login every-time the script runs.
comment created time in 12 days
create barnchjaroslawhartman/withings-sync
branch : cross-platform-docker-build
created branch time in 12 days
issue closedjaroslawhartman/withings-sync
Hi @MSMortensen
I think this is pretty much expected that there will be a limit. I'm not sure what's the max and how requests are counted (is it per user or the max is shared for whole app).
I'd suggest to decrease frequency, I believe the counter will get reset-ed after a while. Personally I run the sync once a day.
Best regards, Jarek
Originally posted by @jaroslawhartman in https://github.com/jaroslawhartman/withings-sync/issues/11#issuecomment-722283294
Hi again, I removed the docker container and image, as well as .withings_user.json, and tried to install it again.
I get the same error as before. Any idea how I can get it to work again?
Best Martin
PS: I used my garmin username and password
$ docker run -v $HOME:/root --interactive --tty --name withings stv0g/withings-sync --garmin-username={MY_USERNAME} --garmin-password={MY_PASSWORD}
Unable to find image 'stv0g/withings-sync:latest' locally
latest: Pulling from stv0g/withings-sync
df20fa9351a1: Pull complete
36b3adc4ff6f: Pull complete
3e7ef1bb9eba: Pull complete
78538f72d6a9: Pull complete
1692f1a2776b: Pull complete
4dacf6c2b0b3: Pull complete
c860f9f6deb6: Pull complete
49e18d18e796: Pull complete
5ef3985ee8a9: Pull complete
ae195f2fe619: Pull complete
Digest: sha256:342fbae1c3cfa40c4f91bcbe555abb3038a1d9e14ab091463846671d1de874b4
Status: Downloaded newer image for stv0g/withings-sync:latest
2020-11-08 13:30:33,043 - withings - ERROR - Can't read config file /root/.withings_user.json
2020-11-08 13:30:33,044 - withings - WARNING - User interaction needed to get Authentification Code from Withings!
2020-11-08 13:30:33,044 - withings - WARNING -
2020-11-08 13:30:33,044 - withings - WARNING - Open the following URL in your web browser and copy back the token. You will have 30 seconds before the token expires. HURRY UP!
2020-11-08 13:30:33,045 - withings - WARNING - (This is one-time activity)
2020-11-08 13:30:33,045 - withings - WARNING -
2020-11-08 13:30:33,045 - withings - INFO - https://account.withings.com/oauth2_user/authorize2?response_type=code&client_id=183e03e1f363110b3551f96765c98c10e8f1aa647a37067a1cb64bbbaf491626&state=OK&scope=user.metrics&redirect_uri=https://jaroslawhartman.github.io/withings-sync/contrib/withings.html&
2020-11-08 13:30:33,046 - withings - INFO -
Token : 1fe12aff58bb01943b4750fd7e2fd2cda11de1f1
2020-11-08 13:30:53,622 - withings - INFO - Get Access Token
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 309, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fe503241040>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='account.withings.com', port=443): Max retries exceeded with url: /oauth2/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe503241040>: Failed to establish a new connection: [Errno -3] Try again'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/withings-sync", line 33, in
sys.exit(load_entry_point('withings-sync==3.1.2', 'console_scripts', 'withings-sync')())
File "/usr/local/lib/python3.8/site-packages/withings_sync-3.1.2-py3.8.egg/withings_sync/sync.py", line 191, in main
sync(**vars(args))
File "/usr/local/lib/python3.8/site-packages/withings_sync-3.1.2-py3.8.egg/withings_sync/sync.py", line 77, in sync
withings = WithingsAccount()
File "/usr/local/lib/python3.8/site-packages/withings_sync-3.1.2-py3.8.egg/withings_sync/withings2.py", line 161, in init
self.withings = WithingsOAuth2()
File "/usr/local/lib/python3.8/site-packages/withings_sync-3.1.2-py3.8.egg/withings_sync/withings2.py", line 59, in init
self.getAccessToken()
File "/usr/local/lib/python3.8/site-packages/withings_sync-3.1.2-py3.8.egg/withings_sync/withings2.py", line 106, in getAccessToken
req = requests.post(Withings.TOKEN_URL, params)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='account.withings.com', port=443): Max retries exceeded with url: /oauth2/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe503241040>: Failed to establish a new connection: [Errno -3] Try again'))
closed time in 12 days
MSMortensenissue commentjaroslawhartman/withings-sync
I dig some further digging into this issue. The max retries exeeded message is acutally raised by the Python code not the Withings API. So I assume this must be a connection issue with your setup. Maybe some broken DNS or IPv6.
I am closing the issue here as I doubt its caused by withings-sync and there are no other people with the same issue.
comment created time in 12 days
issue commentjaroslawhartman/withings-sync
I also can not reproduce this issue. Its likely caused by some escaping issues in your env vars.
See also: #17
comment created time in 12 days
issue closedjaroslawhartman/withings-sync
This app will not work if Garmin password contains special characters.
I changed my Garmin password from a word to a more secure one containing %/? (special characters) & withings-sync failed to login to garmin. Eventually I changed y garmin password to one containing only letters & numbers & all works OK again.
closed time in 12 days
IcarusRPR merged jaroslawhartman/withings-sync
See: https://support.withings.com/hc/en-us/articles/360016745358-Deprecating-access-and-refresh-tokens-endpoints
Closes #20
pr closed time in 12 days