TITLE: A counter example in obstruction theory
QUESTION [6 upvotes]: Let $K$ denote a simplicial complex and $Y$ a path-connected topological space. Let us also denote by $K^n$ the $n$-skeleton of $K$. I would like to have an example for the following situation or a proof of its impossibility: 

A map $f^1:K^1\to Y$ that can be extended to $f^2:K^2\to Y$ and yet no such extension can be further extended to $f^3:K^3\to Y$. 

The idea is that there is an obstruction to the existence of $f^3$ already on the one-dimensional level, but not by obstructing the existence of $f^2$. It is written in Hilton and Wylie's book that a bit more general phenomenon of this type is possible:

There is a complex $K$, a subcomplex $L\subseteq K$ and a map $f^0:L\cup K^0\to Y$, such that there is an extension $f^1:L\cup K^1\to Y$ which has an extension over $L\cup K^2$, but not over $L\cup K^3$ while $f^0$ has an extension over $L\cup K^3$.

In words, when trying to extend a given map $f:L\to Y$ over $K$, inductively through $f^n:L\cup K^n$ it is possible to get stuck with an $f^2$ that not only does not have an extension over $L\cup K^3$, it is even impossible to fix it by revising the last step and yet by revising the last two steps it is possible to extend the chosen $f^0$ over $K^3$. I could not find an example for this either so it would also be appreciated.

REPLY [15 votes]: Here is an example with CW complexes rather than simplicial complexes.  I doubt that there is an important difference, although the simplicial case will require more bookkeeping.
Take $K=\mathbb{R}P^3$ and $Y=\mathbb{R}P^2$.  We can give $K$ a CW structure with skeleta $\mathbb{R}P^k$ for $0\leq k\leq 3$.  Let $f^1:\mathbb{R}P^1\to Y$ be the evident inclusion.  Clearly this extends over $K^2$.  Now suppose we have an extension $f^3:K^3=K\to Y$ of $f^1$.   This will then give a graded ring homomorphism $(f^3)^*:H^*(Y;\mathbb{Z}/2)\to H^*(K;\mathbb{Z}/2)$, or in other words $(f^3)^*:(\mathbb{Z}/2)[y]/y^3\to (\mathbb{Z}/2)[x]/x^4$.  Because $f^3$ extends $f^1$ we must have $(f^3)^*(y)=x$.  This gives a contradiction because $y^3=0$ but $x^3\neq 0$.