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

AttributeError: type object 'Attributes' has no attribute 'get_string' #69

Closed umaar closed 4 years ago

umaar commented 4 years ago

Hey thanks for this project! Had just done a git pull, and now when I run the usual make, I see errors:

Downloading latest rhr data from: 2020-06-07
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 37/37 [00:46<00:00,  1.24s/days]
___Importing Latest Data___
Processing profile data
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 58.49files/s]
Processing [<FileType.settings: 2>] FIT data from /me/HealthData/FitFiles
Traceback (most recent call last):
  File "garmin.py", line 340, in <module>
    main(sys.argv[1:])
  File "garmin.py", line 324, in main
    import_data(args.trace, args.latest, args.stats)
  File "garmin.py", line 176, in import_data
    measurement_system = GarminDB.Attributes.measurements_type(garmindb)
  File "/me/GarminDB/GarminDB/garmin_db.py", line 46, in measurements_type
    return Fit.field_enums.DisplayMeasure.from_string(cls.get_string(db, 'measurement_system', default))
AttributeError: type object 'Attributes' has no attribute 'get_string'
      433.94 real         2.65 user         0.47 sys
make: *** [update_garmin] Error 1

Any ideas?

umaar commented 4 years ago

Saw your comment elsewhere to run make update thanks that fixed it

Preliator-code commented 3 years ago

Hey, did you find a solution? I have the same problem.

tcgoetz commented 3 years ago

Your working from the source tree? If so, then run make update at the top of the tree. You might considering using the release via pip install garmindb instead.

Preliator-code commented 3 years ago

I actually used "pip install garmindb" before. Here is how I did it:

2021-07-01_224244

tcgoetz commented 3 years ago

You need to update to a newer version of SQLAlchemy. See https://github.com/tcgoetz/GarminDB/issues/124