Hey,
I have encountered the same issue on my model (using PyMC v4.2.0) and could reproduce the error you got.
I do not have a solution to the problem, but what I’ve found is that the error only appears when using multiple chains. If you need the callback, a workaround (not a solution) may be to set chains=1 and run the sampling process multiple times.