Error launching the run.py
SamSoulVraiment opened this issue · comments
Hello,
I'm very interested in converting gpx files to tcx files.
I installed the requirements, using Python 3.9. (not in virtualenv), it succeeded.
but executing run.py I get the following error::
python run.py --speed 27 1745156986.gpx
Traceback (most recent call last):
File "run.py", line 2, in
from gpxify import Gpxify
File "/Users/olivierrafael/Documents/GIT/gpx/gpxify.py", line 37
print("{} - {}".format(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), msg), *args, **kwargs)
^
SyntaxError: invalid syntax
Any idea of what's going wrong ?
Best Regards,
Olivier .
Hi Oliver, weird. It doesn't say anything more than SyntaxError? What does the following say (it might take another python version than 3.9 on your system depending on your settings):
python --version
You could replace line 37 with:
pass
as it's only status message anyways.
But my guess is that another version is used, eg python 2.7.16 seems to throw an error.
Hi,
you're right, it's python version 2.7.16. Should I upgrade ?
do you recommend to replace the following line with only 'pass' ?:
print("{} - {}".format(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), msg), *args, **kwargs)
Are you on mac os? If so you have 3 choices:
- use
python3
instead ofpython
- replace the line as you stated
- use pyenv or similar to handle multiple python version on your computer
Try 1 or 2.
Thanks, my fault .. it works perfectly with python3 ...
Thanks again for your support !
No worries, great to hear it works!