Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interactive mode error #15

Open
DominikSzabo1 opened this issue Jul 8, 2024 · 3 comments
Open

interactive mode error #15

DominikSzabo1 opened this issue Jul 8, 2024 · 3 comments

Comments

@DominikSzabo1
Copy link

DominikSzabo1 commented Jul 8, 2024

Hi,
thanks for your great tool!

It's not a big deal, but when running it in interactive mode on MacOS, I'm encountering an error after entering the tour id:

Traceback (most recent call last):
  File "/Users/XXX/miniconda3/bin/komootgpx", line 8, in <module>
    sys.exit(entrypoint())
             ^^^^^^^^^^^^
  File "/Users/XXX/miniconda3/lib/python3.11/site-packages/komootgpx/komootgpx.py", line 181, in entrypoint
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "/Users/XXX/miniconda3/lib/python3.11/site-packages/komootgpx/komootgpx.py", line 162, in main
    if not anonymous and tour_selection != "all" and int(tour_selection) not in tours:
                                                     ^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '--help'

The non-interactive mode is working fine (e.g. komootgpx -n -d 1691652230)

@marcin-gryszkalis
Copy link
Contributor

@DominikSzabo1 how did you call komootgpx to get this traceback?
I can confirm that for full interactive mode (no params, entered login+pass+id) I'm getting KeyError in

File "/home/mg/git/KomootGPX/komootgpx/komootgpx.py", line 173, in main
    make_gpx(tour_selection, api, output_dir, no_poi, skip_existing, tours[tour_selection], add_date)
                                                                     ~~~~~^^^^^^^^^^^^^^^^

and for calling with -n only I'm getting json parser error in

  File "/home/mg/git/KomootGPX/komootgpx/api.py", line 72, in print_tours
    tours = self.fetch_tours(tourType, silent=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

this needs more robust testing :) I'll check later tonight.

@marcin-gryszkalis
Copy link
Contributor

marcin-gryszkalis commented Jul 8, 2024

btw. as stated in README: -n, --anonymous Skip authentication, no interactive prompt, valid only with -d - although test for this condition doesn't work.

marcin-gryszkalis added a commit to marcin-gryszkalis/KomootGPX that referenced this issue Jul 8, 2024
marcin-gryszkalis added a commit to marcin-gryszkalis/KomootGPX that referenced this issue Jul 8, 2024
@Jomme5
Copy link

Jomme5 commented Jul 8, 2024

Same
Windows, Python 3

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python312\Scripts\komootgpx.exe\__main__.py", line 7, in <module>
  File "C:\Python312\Lib\site-packages\komootgpx\komootgpx.py", line 181, in entrypoint
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\komootgpx\komootgpx.py", line 173, in main
    make_gpx(tour_selection, api, output_dir, no_poi, skip_existing, tours[tour_selection], add_date)
                                                                     ~~~~~^^^^^^^^^^^^^^^^
KeyError: '1696386925'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants