In Bott's "differential forms in algebraic topology", it is said that the orientation of a sphere bundle is equivalent to say there is an open cover $\{ U_\alpha\} $ on base space $M$ (we assume $M $ is a smooth manifold and the sphere bundle $E$ is $n$-dimensional) and generators $\{ [\sigma_\alpha]\in H^n(E|_{U_\alpha})\} $ such that $\ [\sigma_\alpha]=[\sigma_\beta]$ in $\ H^n(E|_{U_\alpha \cap U_\beta})$ and each generates the cohomology of the fiber when restricted on each fiber. Then the caveat in the book said the cohomology class $\ [\sigma_\alpha]$ agree on the overlap doesn't mean they piece together to get a global cohomology class on $M$.

In fact, the context in the book then investigates the condition when it can piece to get a global cohomology class on $M$: the Euler class $\ e(E) \in H^{n+1}(M)$ vanishes.
But according to the Mayer-Vietoris sequence on the sphere bundle: $$\ 0\to \Omega^*(E|_{U_{\alpha\cup\beta}}\space) \to \Omega^*(E|_{U_{\alpha}}\space)\bigoplus\Omega^*(E|_{U_{\beta}}\space) \to\Omega^*(E|_{U_{\alpha\cap\beta}}\space)\to0$$ so there is a long exact sequence of cohomology: $$...\to H^n(E|_{U_{\alpha\cup\beta}}\space) \to H^n(E|_{U_{\alpha}}\space)\bigoplus H^n(E|_{U_{\beta}}\space) \to H^n(E|_{U_{\alpha\cap\beta}}\space)\to H^{n+1}(E|_{U_{\alpha\cup\beta}}\space)\to...$$ We then put $\ [\sigma_\alpha]$ and$\ [\sigma_\beta]$ in$$\ H^n(E|_{U_{\alpha}}\space)\bigoplus H^n(E|_{U_{\beta}}\space) $$so if cohomology class $\ [\sigma_\alpha]$ and$\ [\sigma_\beta]$ agree on the overlap, it means it lies in the kernal of the next map, so there must exist at least one cohomology class $\ [\sigma_{\alpha\cup\beta}]$ when restricted on $\ U_\alpha$ and $\ U_\beta $ is $\ [\sigma_\alpha]$ and$\ [\sigma_\beta]$ respectively. So we piece together $\ [\sigma_\alpha]$ and $\ [\sigma_\beta]$ with no condition. In fact, if the manifold M is compact, we can repeat this procedure to get a global cohomology class on E. It means that we can always piece together them on a compact manifold. But the Euler class of a sphere bundle on a compact manifold is not always zero.
So my question is what's wrong in it? Besides, I found a similar argument in Spanier's Algebraic Topology (page 262), it said that the similar orientation class can always be pieced together. So what's the difference behind these two arguments? I'm really confusing. Thank you!
