Narrative:

I was flying and practicing touch & go in ZZZ. I had a very good landing with 40 degrees flaps down. Followed the procedures for takeoff however aircraft wasn't picking up air speed. In about end of the runway air speed was at around 45 to 50 knots. My instructor and I started questioning as to why we are not climbing; however after a short investigation he said oh; wing flaps were not retracted. He quickly moved the wing flaps handle down and up to manipulate and retract with no luck. By then we knew wing flaps were not functioning. He took over the flying by saying 'I will fly from here.'while trying all to get the wings flaps retracted and fly the aircraft; we realized we need to fly the aircraft to safety. By now we were over the housing subdivision. He [advised ATC] while flying. I think we were about 15 to 20 feet above the first row of houses.we both didn't panic and started looking for a place to land while he was trying to keep the aircraft above the houses with airspeed not more than 45 knots. We found a street but it was very short and had a left curve not suitable for a safe landing. Also a small park east of the same street was noticeable but we didn't have enough elevation to see if it is suitable for landing or not.as he was trying everything possible to keep the aircraft above the houses and look for closes distance to open space. By now we were facing the west and turning north while keeping the aircraft above the houses by not more than 15 to 20 foot. As we got closer to end of the housing subdivision I took a deep breath and shouted I think we can land anywhere in open space now or in ZZZ airport. He said I will try to land in ZZZ airport and started letting everyone know we are emergency landing on runway 33.eventually he landed on runway 33 and I was very impressed with the way he handled the whole situation that could have been a tragic event. He taxied off the runway and parked. From what I could see and feel both of us were relieved and calm. I suggested that we should let someone know about this matter in ZZZ airport because they may receive calls from homeowners. Also we decided to call home base to let them know about the aircraft wing flap not working.as we were discussing as to what could have happened to the wing flaps I decided to turn on the master switch and give it another try in which wing flaps retracted. He decided to fly back [to home airport] with wing flaps up.

Google
 

Original NASA ASRS Text

Title: C172 pilot and flight instructor reported difficulty climbing when the flap retraction system malfunctioned in the fully extended position.

Narrative: I was flying and practicing Touch & Go in ZZZ. I had a very good landing with 40 degrees Flaps down. Followed the procedures for Takeoff however Aircraft wasn't picking up Air Speed. In about end of the runway Air Speed was at around 45 to 50 Knots. My instructor and I started questioning as to why we are not climbing; however after a short investigation he said oh; Wing Flaps were not retracted. He quickly moved the Wing Flaps handle down and up to manipulate and retract with no luck. By then we knew Wing Flaps were not functioning. He took over the flying by saying 'I will fly from here.'While trying all to get the Wings Flaps retracted and fly the Aircraft; we realized we need to fly the aircraft to safety. By now we were over the housing subdivision. He [advised ATC] while flying. I think we were about 15 to 20 feet above the first row of houses.We both didn't panic and started looking for a place to land while he was trying to keep the Aircraft above the houses with Airspeed not more than 45 knots. We found a street but it was very short and had a left curve not suitable for a safe landing. Also a small park East of the same street was noticeable but we didn't have enough elevation to see if it is suitable for landing or not.As he was trying everything possible to keep the Aircraft above the houses and look for closes distance to open space. By now we were facing the West and turning North while keeping the Aircraft above the houses by not more than 15 to 20 foot. As we got closer to end of the housing subdivision I took a deep breath and shouted I think we can land anywhere in open space now or in ZZZ Airport. He said I will try to land in ZZZ Airport and started letting everyone know we are emergency landing on Runway 33.Eventually he landed on Runway 33 and I was very impressed with the way he handled the whole situation that could have been a tragic event. He taxied off the Runway and parked. From what I could see and feel both of us were relieved and calm. I suggested that we should let someone know about this matter in ZZZ Airport because they may receive calls from homeowners. Also we decided to call home base to let them know about the Aircraft Wing Flap not working.As we were discussing as to what could have happened to the Wing Flaps I decided to turn on the Master Switch and give it another try in which Wing Flaps retracted. He decided to fly back [to home airport] with Wing Flaps up.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.