Hy, I am working with the Python library StravaIO from here
I am trying to get all the segments inside an activity. And for that, I am using the get_activity_by_id function. For that function to return the effort list, I needed to include the 'include_all_efforts' parameters. Here is my code:
params = {'include_all_efforts':True}
activity = client.get_activity_by_id(some_id ,**params)
I am getting the ERROR:
TypeError: get_activity_by_id() got an unexpected keyword argument 'include_all_efforts'
The strange thing is that I checked the source code and in line 225 there is the same ERROR but with different text. This means the code is not getting here, I suppose.
Am I doing something wrong?
The error is self explanatory. It says that 'include_all_efforts'
is an unexpected keyword argument. That means that the method get_activity_by_id()
does not have `include_all_efforts' as a named keyword parameter.
I found this on github (here) and took a quick look. It does seem to have that option, however it looks like it was added in Dec 2019. Are you sure the version you have has that option? Are you running the most recent version? The error says that you don't have this feature.