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

Issue when creating a new DB #37

Closed leosouliotis closed 4 years ago

leosouliotis commented 4 years ago

After cloning the repo, and run make setup, I tried to create my first DB by running make create_dbs, but the following error appeared:

Traceback (most recent call last): File "garmin.py", line 18, in from version import print_version, python_version_check, log_version File "/Users/u1560476/Documents/GarminDB/version.py", line 7, in import utilities.version as uv File "/Users/u1560476/Documents/GarminDB/utilities/init.py", line 11, in from utilities.db import DbParams, DB, DBObject File "/Users/u1560476/Documents/GarminDB/utilities/db.py", line 35 return f'<{self.class.name}() {repr(self.dict)}' ^ SyntaxError: invalid syntax Traceback (most recent call last): File "garmin.py", line 18, in from version import print_version, python_version_check, log_version File "/Users/u1560476/Documents/GarminDB/version.py", line 7, in import utilities.version as uv File "/Users/u1560476/Documents/GarminDB/utilities/init.py", line 11, in from utilities.db import DbParams, DB, DBObject File "/Users/u1560476/Documents/GarminDB/utilities/db.py", line 35 return f'<{self.class.name}() {repr(self.dict)}' ^ SyntaxError: invalid syntax time /usr/local/bin/python3 garmin.py --all --download --import --analyze Traceback (most recent call last): File "garmin.py", line 18, in from version import print_version, python_version_check, log_version File "/Users/u1560476/Documents/GarminDB/version.py", line 7, in import utilities.version as uv File "/Users/u1560476/Documents/GarminDB/utilities/init.py", line 11, in from utilities.db import DbParams, DB, DBObject File "/Users/u1560476/Documents/GarminDB/utilities/db.py", line 35 return f'<{self.class.name}() {repr(self.dict)}' ^ SyntaxError: invalid syntax 0.07 real 0.05 user 0.01 sys make: *** [garmin] Error 1

Any suggestions? Of course, I replaced the example .json file with the one having the information I want.

tcgoetz commented 4 years ago

What version of Python are you using?

The errors are for the f-strings. f-strings were added in Python 3.6.

leosouliotis commented 4 years ago

I use Python 3.6, that's true, good to know that :)

leosouliotis commented 4 years ago

Problem solved; apparently, don't know if it's my computer's problem, but it seems that it execuyes every python script using the python version located in /usr/bin/python, while I use python via anaconda.

tcgoetz commented 4 years ago

If your using the make files you can change the PYTHON define.