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.11k stars 137 forks source link

Help with installation #119

Closed showdownhero closed 1 year ago

showdownhero commented 3 years ago

Hi guys,

I've tried numerous times to run make setup but I keep getting the same errors. I'm sure this is a total noob question as I'm very new to make and don't really know what I'm doing but I've followed the readme.md, wiki useage and requirements.txt as closely as possible.

C:\git\GarminDB>mingw32-make setup process_begin: CreateProcess(NULL, uname, ...) failed. process_begin: CreateProcess(NULL, uname, ...) failed. process_begin: CreateProcess(NULL, which python3, ...) failed. defines.mk:62: *** Python not found. Stop.

C:\git\GarminDB>

tcgoetz commented 3 years ago

Looks like your trying to setup GarminDB in native Windows. I'm not aware of anyone having done this. The immediately issue is the make script can't find Python, but if solve that their will probably be other issues. To use GarminDB on Windows I would use Windows Subsystem for Linux: https://docs.microsoft.com/en-us/windows/wsl/install-win10

showdownhero commented 3 years ago

Hi Tom,

Thanks for your speedy response, indeed I was trying to run this out of the windows command prompt shell... not very smart.

I've loaded up Windows Subsystem for Linux but I'm still having some issues, are you able to assist?

/mnt/c/git/garmindb$ make setup
git submodule init
git submodule update
error: chmod on /mnt/c/git/garmindb/.git/modules/Fit/config.lock failed: Operation not permitted
fatal: could not set 'core.worktree' to '../../../Fit'
make: *** [Makefile:52: submodules_update] Error 1
showdownhero commented 3 years ago

Ok, never mind the above message I realised it was because git wasn't installed but now I have a different error when I run make setup

/mnt/c/git/garmindb$ make setup
git submodule init
git submodule update
git pull --rebase
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

make: *** [Makefile:48: update] Error 1
showdownhero commented 3 years ago

Ok so I was able to fix the above error with git branch --set-upstream-to=origin/master master

But upon running make create_dbs I've run into a different problem

/mnt/c/git/garmindb$ make create_dbs
/usr/bin/time /usr/bin/python3 garmin.py --all --download --import --analyze
___Downloading All Data___
Traceback (most recent call last):
  File "garmin.py", line 341, in <module>
    main(sys.argv[1:])
  File "garmin.py", line 322, in main
    download_data(args.overwrite, args.latest, args.stats)
  File "garmin.py", line 114, in download_data
    download = Download()
  File "/mnt/c/git/garmindb/download_garmin.py", line 64, in __init__
    self.sso_rest_client = RestClient(self.session, 'sso.garmin.com', 'sso', aditional_headers=self.garmin_headers)
TypeError: __init__() got an unexpected keyword argument 'aditional_headers'
Command exited with non-zero status 1
/usr/bin/time
make: *** [Makefile:134: garmin] Error 1
showdownhero commented 3 years ago

So I realised I initially cloned the repository using git in windows command prompt so I have recloned using Ubuntu and I think I may have rectified the errors

In the process of downloading now

image

showdownhero commented 3 years ago

So this isn't a installation related issue as everything appears to have downloaded correctly but I'm now having a separate issue with the 'make graphs' command

This is the only code in the shell

/mnt/c/git/GarminDB$ make graphs
/usr/bin/python3 graphs.py --all

and this is all that's written in graphs.log

INFO:utilities.db_object:Found time_col_name timestamp for table summary

tcgoetz commented 1 year ago

make based commands are deprecated for normal users. Use pip installable package.