Error on running out of sample sampling

The error is trying to tell you that the samples variable you passed is a PyMC model, but it should just be a number.
You must have overwritten it somewhere by accident.

It should also work do do just pm.sample_posterior_predictive(trace)