marcusvolz / strava_py

Create artistic visualisations with your exercise data (Python version)
MIT License
152 stars 18 forks source link

Fix ValueError with --activities_path #12

Closed hugovk closed 2 years ago

hugovk commented 2 years ago

Oops, I should have actually tested https://github.com/marcusvolz/strava_py/pull/11 with --activities_path file:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/stravavis", line 33, in <module>
    sys.exit(load_entry_point('stravavis', 'console_scripts', 'stravavis')())
  File "/Users/hugo/github/strava_py/src/stravavis/cli.py", line 73, in main
    if activities:
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pandas/core/generic.py", line 1537, in __nonzero__
    raise ValueError(
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

So this one should be is not None.