OK, thanks. The problem is that, while usually, PyMC will recognize a Dirichlet as the parent of a Categorical and completes the probability simplex, here your Categoricals are embedded in a Container, and the Categorical does not make the automatic adjustment needed. The following code does this for you:
import numpy as np
import pymc as pm
aRange = 3
bRange = 4
aCPT = pm.Dirichlet('aCPT', np.ones(aRange))
#make variable a
a = pm.Categorical('a', aCPT)
#make a CPT table as an array of
CPTLines = [pm.Dirichlet('CPTLine%i' %i, np.ones(bRange)) for i in range(aRange)]
#make a node for variable b
@pm.stochastic(dtype=int)
def b(value=0, CPT=CPTLines, a=a):
return pm.categorical_like(value, p=pm.extend_dirichlet(CPT[a]))
model = pm.MCMC([a, b, CPTLines])
Hope that helps.