In the presence of a hypothetical magnetic point charge at the origin of coordinates, it turns out that an irremovable physical singularity of the vector potential ${\bf A}({\bf r})$ exists for any choice of ${\bf A}({\bf r})$, extending from the origin to infinity in a radially outward direction. This is called the Dirac string. Let us consider a particular choice of ${\bf A}({\bf r})$ such that the Dirac string lies along the positive $z$ axis. This choice is $${\bf A}({\bf r}) = \frac{g}{r(r-z)}(y\hat{{ x}}-x\hat{{y}}),\nonumber\\ ~~~~= -\frac{g(1+\cos\theta)}{r\sin\theta}\hat{{\phi}}. $$ There is a genuine singularity at $\theta=0$ i.e. on the entirety of positive $z$-axis!
Now consider the following steps. First, consider a punctured sphere with its center at the origin and the punctured disc pierced by the positive $z$ axis such that the Dirac string passes through the disc. Next, consider a closed loop $C$ and along the circumference of the disc enclosing the Dirac string.
Is Stokes' theorem valid here? I recall from memory that Stokes' theorem is valid if both the surface and the loop enclosing surface are in a region where the vector field is free from singularities. In this particular situation, the loop $C$, as well as the curved surface of the sphere enclosed by the loop, lie in a singularity-free region of ${\bf A}({\bf r})$. However, if we consider the circular puncture enclosed by the loop, this disc not free from the singularity. Because it is pierced by the positive $z$-axis.