Preliminary definitions: Let $K$ be an algebraic function field over $\mathbb F_p$ i.e. $K$ is a finite extension of $\mathbb F_p(t)=K_0$. For any discrete valuation $v$ on $K$, a character on $K_v$ is a continuous group homomorphism $\xi_v: K_v\to S^1$, where clearly $K_v$ is the completion of $K$ with respect to $v$.
The conductor of $\xi_v$ is:
$$\mathfrak c_{\xi_v}:=\min \{r\in\mathbb Z\colon \xi_v(\mathfrak p^r_v)=0\}$$
For any place $v$ on $K$ let's define the following standard character: $$\psi_v(a):=e^{\frac{2\pi i}{p} \operatorname{res}\left (\operatorname{tr}_{K_v|K_0}(a)\right)}$$ where $\operatorname{res}(\cdot)$ is the usual Tate's residue map on $K_0$, and clearly in the above formula we consider any lift in $\mathbb Z$ of $\operatorname{res}\left (\operatorname{tr}_{K_v|K_0}(a)\right)\in\mathbb F_p$.
Question: The product $\psi:=\prod_{v}\psi_v$ is a well defined character on the ring of adeles $\mathbb A_K$. In Valenza & Ramakrishnan's book at chapter 7.2 the authors claim that $\psi$ induces a divisor as it follows: $$D_\psi:=\sum_v-\mathfrak c_{\psi_v}v$$
I don't understand why all but finitely many integers $\mathfrak c_{\psi_v}$ are equal to $0$. Can you explain this point please?
One should prove that all but finitely many $\psi_v$ have conductor equal to $0$. The conductor of the residue map on $K_0$ is always $0$, since the residue map is the $a_{-1}$ term in the Laurent expansion, therefore something happens with the trace...
The way I learned this comes from a trick called the "no small subgroup" argument. As you say, $\psi = \prod\limits_v \psi_v$ is a continuous homomorphism of $\mathbb{A}_K$ into $S^1$.
Let $U$ be the set of points in $S^1$ which lie in the right half plane, i.e. $U = \{ e^{i \theta} : -\pi/2 < \theta < \pi/2 \}$. The important thing about $U$ is that it is open in $S^1$, and it does not contain any subgroups of $S^1$ except the trivial one.
Since $\psi$ is continuous, $\psi^{-1}(U)$ must be an open set in $\mathbb{A}_K$. Of course $0 \in \psi^{-1}(U)$.
If $S$ is a finite set of places, and $n_v : v \in S$ is a collection of positive integers,
$$N = \prod\limits_{v \in S} \mathfrak p_v^{n_v} \prod\limits_v \mathcal O_v$$
is an open subgroup of $\mathbb{A}_K$. These $N$ form a neighborhood basis of the identity, in the sense that for any neighborhood $W$ of the identity of $\mathbb{A}_K$, one can choose $S$ and the $n_v$ large enough so that $N$ is contained in $W$. In particular, we can arrange that $N$ be contained in $\psi^{-1}(U)$.
Then $\psi(N)$ is contained in $U$. Since $N$ is a subgroup of $\mathbb{A}_K$, $\psi(N)$ is one of $S^1$, and so we must have $\psi(N) = \{1\}$. This tells us two things: