How to resolve argument of length 0 error while using boosting in R

Hello,

I am trying to implement adaboost for one of the problems but am being hit by an un-understandable error :stuck_out_tongue:

> churn.boost <- boosting.cv(Churn ~ ., data = churn,v = 10,boos = T,
+                            mfinal = 10,control = rpart.control(cp = 0.05))
Error in 1:nrow(object$splits) : argument of length 0 

What does this error mean and how do I rectify it??

for output column do as.factor
example

train$target ← as.factor(train$target)