  Density functional calculations within the weighted density approximation
(WDA) are presented for YH$_3$ and LaH$_3$. We investigate some commonly used
pair-distribution functions G. These calculations show that within a consistent
density functional framework a substantial insulating gap can be obtained while
at the same time retaining structural properties in accord with experimental
data. Our WDA band structures agree with those of $GW$ approximation very well,
but the calculated band gaps are still 1.0-2.0 eV smaller than experimental
findings.
