in reply to Perk/Tk error..

What is the problem will cause this error?

You mean to ask why some variable is not defined when some code tries to call ->predict on it? This question cannot be answered without code to examine.