We give a unified account of quantum non-locality and contextuality in sheaf-theoretic terms. The existence of local hidden variable models is shown to be equivalent to the existence of global sections. Bell's theorem and related results amount to showing that there are obstructions to global sections in the probability models arising from quantum mechanics. We also discuss how sheaf cohomology can be used to characterise these obstructions.