Showing results for 
Search instead for 
Did you mean: 

Error assigning new segment champion in the API

Error assigning new segment champion in the API

I am trying to assign a new Segment Champion using the API and I am running into this error:

Exception: 422 client error: {'message': 'Invalid field data', 'errors': {'clone': 'clone is not allowed key'}}

Below is the code that is causing the error, any ideas on why this is happening/how I can fix this?


        if != dr.Model.get(, s.model_id).id:
                print('Setting new champion for {}: {} instead of {}'.format(s_project.project_name, best.model_type, dr.Model.get(s.project_id, s.model_id).model_type))
                CombinedModel.set_segment_champion(project_id =, model_id =, clone = True)
            except Exception as e:
                print('Error assigning new champion')
                print('Exception: {}'.format(e))
Labels (1)
3 Replies

Sorry for the confusion - to reiterate I'd suggest checking the DR (non-python client) version you're using to see if `clone` is available.


And again, if not you might need an _earlier_ version of the Python Client

Hi there,


I am taking a look at the docs for `set_segment_champion()` here and do indeed see the boolean `clone` argument:


As I can see those docs the clone argument says:

(New in version v2.29)


Are you using a version of DataRobot that is v2.28 or lower?

If so maybe you might want to use an earlier version of the python client like 2.28.1


Hi, Tyler!


May you check your datarobot module version?




If it's below 3.0.2 - try upgrading. If error remains - try to raise this error to support team.