PO171 can be caused by a variety of conditions, including:
1. Misrouted Oxygen sensor wiring contacting the exhaust system
2. Poor PCM to engine block grounds
3. Low fuel pressure or injector problems
4. Vacuum leaks at the throttle body, EGR valve, and intake manifold. Damaged or disconnected hoses, improperly installed or bad PCV Valve
5. Exhaust leaks in system, cracked or leaking exhaust manifold etc.
6. Mass Air Flow Sensor
7. Fuel Contamination by water or alcohol
8. Poor connections at the PCM or damaged wiring harness.
Good Luck!