I'm trying to read about obstruction theory from Davis & Kirk and trying to find a map $ g \colon X_n \rightarrow Y $ from the $ n $-skeleton of a relative CW complex $ (X,A) $ to a path-connected $ n $-simple space $ Y $ such that the obstruction cocycle $ \theta^{n+1}(g) $ is nonzero but the class $ [\theta^{n+1}(g)] $ is zero. Equivalently, I'd like to find a map $ g $ so that $ g $ does not extend to $ X_{n+1} $ but $ g|_{X_{n-1}} $ does.
Are there any simple examples of this? I was thinking about maybe using odd-dimensional $ \mathbb{R}\mathrm{P}^n $, but I can't seem to figure anything out...