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

strava activity throws me this error #28

Open
lucamanga opened this issue Jul 23, 2023 · 1 comment
Open

strava activity throws me this error #28

lucamanga opened this issue Jul 23, 2023 · 1 comment

Comments

@lucamanga
Copy link

# strava activity 9505348135
Traceback (most recent call last):
  File "/home/luca/.local/bin/strava", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/luca/.local/lib/python3.10/site-packages/strava/decorators.py", line 103, in wrapper_login_required
    return func(*args, **kwargs)
  File "/home/luca/.local/lib/python3.10/site-packages/strava/commands/activity.py", line 43, in get_activity
    _format_activity(result, output=output)
  File "/home/luca/.local/lib/python3.10/site-packages/strava/decorators.py", line 62, in wrapper_format_result
    res = func(*args, **kwargs)
  File "/home/luca/.local/lib/python3.10/site-packages/strava/commands/activity.py", line 52, in _format_activity
    return result if output == OutputType.JSON.value else _as_table(result)
  File "/home/luca/.local/lib/python3.10/site-packages/strava/commands/activity.py", line 123, in _as_table
    for k, v in apply_formatters(activity, formatters).items()
  File "/home/luca/.local/lib/python3.10/site-packages/strava/formatters.py", line 102, in apply_formatters
    return {
  File "/home/luca/.local/lib/python3.10/site-packages/strava/formatters.py", line 103, in <dictcomp>
    k: formatter(activity[k], activity) if k in activity else N_A
TypeError: _as_table.<locals>.format_gear() takes 1 positional argument but 2 were given
@11100010
Copy link

~  strava activity 11279268066 9ms
Name: 🏃 Running
0W17#273
Start date: 2024-04-28 04:26:11+07:00
Moving time: 1h 7m
Distance: 11.31 km
Average speed: 05:56 /km
Max speed: 02:34 /km
Average heartrate: 147 bpm
Max heartrate: 159 bpm
Total elevation gain: 5 m
Calories: 986.0
Device name: N/A
Gear: N/A
Split 1: 👟 05:60 /km ❤ 121 bpm ➡ 0 m
Split 2: 👟 05:48 /km ❤ 140 bpm ➡ 0 m
Split 3: 👟 05:42 /km ❤ 143 bpm ➡ 0 m
Split 4: 👟 05:38 /km ❤ 149 bpm ➡ 0 m
Split 5: 👟 05:51 /km ❤ 148 bpm ➡ 0 m
Split 6: 👟 05:50 /km ❤ 150 bpm ➡ 0 m
Split 7: 👟 05:48 /km ❤ 153 bpm ➡ 0 m
Split 8: 👟 05:47 /km ❤ 156 bpm ➡ 0 m
Split 9: 👟 06:10 /km ❤ 152 bpm ➡ 0 m
Split 10: 👟 06:17 /km ❤ 151 bpm ➡ 0 m
Split 11: 👟 06:15 /km ❤ 152 bpm ➡ 0 m
Split 12: 👟 06:13 /km ❤ 156 bpm ⬆ 1 m

Mine works fine.

You should get some clue from this traceback:
"TypeError: _as_table..format_gear() takes 1 positional argument but 2 were given"

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

2 participants