Closed leosouliotis closed 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.
I use Python 3.6, that's true, good to know that :)
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.
If your using the make files you can change the PYTHON define.
After cloning the repo, and run
make setup
, I tried to create my first DB by runningmake 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.