sladkovm / stravaio

Python client for Strava API with a focus on fluent data handling
MIT License
71 stars 30 forks source link

Error when activity_type is different from 'Ride' and 'Run' (e.g. Hike) #7

Open afrigeri opened 4 years ago

afrigeri commented 4 years ago

Got error when retrieving hiking activity:

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/swagger_client/models/summary_segment.py", line 196, in activity_type .format(activity_type, allowed_values) ValueError: Invalid value for activity_type (Hike), must be one of ['Ride', 'Run']

is it possible to add other types of activities?

sladkovm commented 4 years ago

Hi Alessandro,

thanks for reporting, I will look into it in the next couple of weeks (currently a bit crunched at the job that pays my bills)

From the location of the error, I would guess we need to recompile a new swagger_client that implements low-level strava API calls.

Srava Swagger Client

ffrie commented 4 years ago

Any update? Same behavior for VirtualRide.

ValueError: Invalid value foractivity_type(VirtualRide), must be one of ['Ride', 'Run']

gmajor67 commented 2 years ago

I had this error as well and updated the relevant swagger_client code to allowed_values = ["Ride", "Run", "VirtualRide"]