I am not sure exactly how you are building your model, it seems you are doing something a bit complex that makes the theano graph detached an input.
Here is a minimalistic example that works:
p_shape = 10
with pm.Model() as model:
alpha = pm.HalfNormal('alpha', 5.)
beta = pm.HalfNormal('beta', 5.)
y = pm.BetaBinomial('obs', n=10, alpha=alpha, beta=beta, observed=np.random.binomial(10, .7, size=p_shape))
trace = pm.sample()
with model:
p = pm.Beta('p', alpha, beta, shape=p_shape)
ppc = pm.sample_ppc(trace, 1000, vars=[p])