Repository navigation
|
Hi all and thanks for this, I don't really undersatnd py code, but i've been running downloads from Garmin and processing a Json file via matplotlib so this is a life saver for aging parents needing health data. I'm having an issue at the credentials part. I've installed the Py and upgraded, I can see the local directory on my windows machine containing my .venv files and i've download examples.py. If I run when I run when I run my first spot of confusion is the line "garmin = Garmin(email, password) where do I run this from ? cmd or py prompt Thanks |
Replies: 2 comments 1 reply
|
To your last question first: The readchar error is because demo.py imports One Windows gotcha too. A venv on Windows only has If you cloned the whole repo instead, The certificate error is the real blocker and it isn't a code or password problem. "unable to get local issuer certificate" means Python couldn't trace Garmin's certificate back to a root it trusts. Garmin's login site verifies fine against the standard certificate bundle that gets installed with requests, so when it fails like this it usually means something on your PC or network is putting its own certificate in front of HTTPS traffic. Antivirus "HTTPS scanning" or "web shield" features and work or corporate networks are the usual suspects. Trying from a different network, or switching off the HTTPS scanning option in your antivirus, is the quickest way to confirm. If you'd rather keep the antivirus setting, you can make Python trust the Windows certificate store (which already trusts your antivirus or company certificate) with: That patches Python's SSL to use the Windows store, which covers the plain requests login paths the library falls back to (client.py#L515-L524). Install it inside the activated venv and run |
|
Just to confirm that SSL error i thnk was down to a Proxy FW. I connected and got login succesful, token saved and today read out from Garmin. |
To your last question first:
garmin = Garmin(email, password)and theloginline are Python code, not cmd commands. You don't need to type them anywhere because example.py already does exactly that for you. It tries saved tokens first, and if there are none it asks for your email and password and saves new tokens to~/.garminconnect(example.py#L98-L129). So the "No valid tokens found" message on the first run is normal and just means it hasn't logged in before (L113).The readchar error is because demo.py imports
readchar(demo.py#L33) and that isn't part of the base install. It lives in theexampleextra (pyproject.toml#L111-L113).pip install ./demo.pycan't work because pip installs p…