I found a work around: just cast the list of integrals into a tensor variable, i.e. modify the following line in the test2.py file in the previous post to
y = pm.Normal('y', mu=tt.as_tensor_variable(mu), sd=0.1, observed=y_obs)
Now, everything runs well.