MCMC issues with: Location parameter is nan, but must be finite!

I get a similar error and I do not know how can I check if it’s during warm up or after it. Is there a way to print the iteration number in PyStan?