  A self-duality group $\cal G$ in quantum field theory can have anomalies. In
that case, the space of ordinary coupling constants $\cal M$ can be extended to
include the space $\cal F$ of coefficients of counterterms in background
fields. The extended space $\cal N$ forms a bundle over $\cal M$ with fiber
$\cal F$, and the topology of the bundle is determined by the anomaly. For
example, the ${\cal G}=SL(2,\mathbb{Z})$ duality of the 4d Maxwell theory has
an anomaly, and the space ${\cal F}=S^1$ for the gravitational theta-angle is
nontrivially fibered over ${\cal M}=\mathbb{H}/SL(2,\mathbb{Z})$. We will
explain a simple method to determine the anomaly when the 4d theory is obtained
by compactifying a 6d theory on a Riemann surface in terms of the anomaly
polynomial of the parent 6d theory. Our observations resolve an apparent
contradiction associated with the global structure of the Kahler potential on
the space of exactly marginal couplings of supersymmetric theories.
