tcgoetz / GarminDB

Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.16k stars 142 forks source link

cannot download data from garmin #202

Closed EmptySoft closed 1 year ago

EmptySoft commented 1 year ago

installed package garmindb 3.5.0, installed using Python 3.11.5

when i try to run /usr/bin/garmindb_cli.py --all --download --import --latest

i get `Downloading Latest Data Traceback (most recent call last): File "/usr/bin/garmindb_cli.py", line 358, in main(sys.argv[1:]) File "/usr/bin/garmindb_cli.py", line 339, in main download_data(args.overwrite, args.latest, args.stats) File "/usr/bin/garmindb_cli.py", line 112, in download_data if not download.login(): ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/garmindb/download.py", line 166, in login self.display_name = self.user_prefs['displayName']


TypeError: 'NoneType' object is not subscriptable
`
tcgoetz commented 1 year ago

That looks like the stack from the failure that 3.5 fixed.

EmptySoft commented 1 year ago

Hi Tom.! Which 3.5 do you mean? I have GarminDB 3.5 installed.

EmptySoft commented 1 year ago

OK, i have done a upgrade via pip install --upgrade garmindb now i get kalymnos:~> /usr/bin/garmindb_cli.py --all --download --import --latest Traceback (most recent call last): File "/usr/bin/garmindb_cli.py", line 28, in <module> from garmindb import GarminProfile, GarminWeightData, GarminSummaryData, GarminMonitoringFitData, GarminSleepFitData, GarminSleepData, GarminRhrData, GarminSettingsFitData, \ ImportError: cannot import name 'GarminProfile' from 'garmindb' (/home/harald/.local/lib/python3.11/site-packages/garmindb/__init__.py)

Preliator-code commented 1 year ago

Oh yes ! i had the same issue. I fixed that in download.py 2023-10-10_090716

EmptySoft commented 1 year ago

Sorry, what Data have i to insert? If i fill out with my name i got the same Error ...

harald@kalymnos:~/.local/lib/python3.11/site-packages/garmindb> /usr/bin/garmindb_cli.py --all --download --import --latest Traceback (most recent call last): File "/usr/bin/garmindb_cli.py", line 28, in <module> from garmindb import GarminProfile, GarminWeightData, GarminSummaryData, GarminMonitoringFitData, GarminSleepFitData, GarminSleepData, GarminRhrData, GarminSettingsFitData, \ ImportError: cannot import name 'GarminProfile' from 'garmindb' (/home/harald/.local/lib/python3.11/site-packages/garmindb/__init__.py)

tcgoetz commented 1 year ago

An import error like that sounds like a mismatch between the version of the cli and the rest of the package. I don't have access to a computer right now to check the actual commands, but I would uninstall and then reinstall GarminDb.

EmptySoft commented 1 year ago

Hi Tom.!

Thank you so much, after uninstall all garmindb Files and new clean install it works

Thanks, Harald