Propagation of uncertainty

Sorry if it’s dumb, but I’m stuck
This is my code (more or less)

I’m not able to sample from the trace for a and b

with pm.Model() as a_model:

		a = pm.Normal('a', mu=0.4, sigma=0.04)
		b = pm.Normal('b', mu=0.9, sigma=0.2)
		c = pm.Normal('c', mu=0.03, sigma=0.01)
		e = pm.HalfCauchy('e',0.1)
		u = func ( x, a, b, c)

		y_pre = pm.Normal(‘y_pre',mu=u, sigma=e, observed=y_obs)	
		trace_a=pm.sample(2000, tune=500, random_seed=42)

		b_m = float(trace_a.posterior["b"].mean())

with pm.Model() as b_model:

		e2 = pm.HalfCauchy('e2',0.1)
		f = pm.Normal('f', mu=0.3, sigma=0.1)
		g = pm.Normal('g', mu=0.6, sigma=0.02)
				
		u2 = func2 ( x2, b_m, f, g)

		y_pre2 = pm.Normal(‘y_pre2',mu=u2, sigma=e2, observed=y_obs2)
		trace_b=pm.sample(2000, tune=500, random_seed=42)

	t_post_a=trace_a.posterior
	t_post_b=trace_b.posterior

	final = [] 
	final = np.append(final,func3(x3,t_post_a["b"],t_post_a["a"],t_post_a["c"],t_post_b["f"],t_post_b["g"]))