It seems you are striaghtaway running the function predictknn using run button. You should not run/ call a function like this.
You have to see what are the inputs to the function and define those inputs and then call the function. In this case, I see that your function predictknn needs a input Xtest. First define your input variable.
Xtest = define your input here ;
out = predictknn(Xtest) ;