That type of error often means a data problem, for example dividing by standard deviation zero, or something similar. Please look at your data values. Do you have enough items at each level of x that standard deviations can be calculated?