pe-st / garmin-connect-export

Download a copy of your Garmin Connect data, including stats and GPX tracks.
MIT License
370 stars 76 forks source link

subdir quit working after update #37

Closed jamorris closed 4 years ago

jamorris commented 4 years ago

Subdir no longer works after I updated to gcexport.py 3.0.0. I tried with Python 2.7.12 and Python 3.7.7. Running: python3 gcexport.py -d ~/Activities/GarminConnect -c 10 -f original --desc --username xxxx --subdir activities Results in the following error: Traceback (most recent call last): File "/home/john/Documents/Git/garmin-connect-export/gcexport.py", line 1057, in <module> main(sys.argv) File "/home/john/Documents/Git/garmin-connect-export/gcexport.py", line 1038, in main actvty['startTimeLocal']) File "/home/john/Documents/Git/garmin-connect-export/gcexport.py", line 710, in export_data_file directory = resolve_path(args.directory, args.subdir, start_time_locale) File "/home/john/Documents/Git/garmin-connect-export/gcexport.py", line 163, in resolve_path ret = join(directory, subdir) NameError: name 'join' is not defined The --directory and --subdir folders both exist and this worked before the update. If I remove --subdir activities from the command it works.

telemaxx commented 4 years ago

in line 163 we forgot to change from: ret = join(directory, subdir) to: ret = os.path.join(directory, subdir)

jamorris commented 4 years ago

Thank you. I made the change and it's working again.

telemaxx commented 4 years ago

patch: https://github.com/pe-st/garmin-connect-export/pull/38

pe-st commented 4 years ago

@jamorris Thanks for reporting this, should be fixed now