Trouble Code P0171
Your Toyota Camry trouble code P0171 indicates the oxygen sensor (bank 1) has detected a lean fuel condition. This means the oxygen sensor has thinks there is too much oxygen in the exhaust (not enough fuel). Bank 1 is the side of your Toyota Camry's engine that has the number one cylinder.
Trouble code P0171 may mean that one or more of the following has happened:
•Your Toyota's MAF (Mass Air Flow) Sensor is dirty or defective.
•Your Toyota may have a vacuum leak located somewhere after the MAF sensor which caused cause trouble code P0171. This is referred to as downstream the MAF. You might want to look for possible cracked vacuum hoses or broken PCV connections or hoses. You may also want to ensure the PCV valve is not stuck open.
•Faulty or defective oxygen sensor (bank 1, sensor 1). If the oxygen sensor is faulty it will not be producing the voltage require to indicate 14.7:1 air/fuel ratio.
•Some fuel related mechanical faults to look into include sticking or plugged fuel injectors, low fuel pressure due to faulty fuel pump or dirty fuel filter.
Trouble Code P0450
Trouble code P0450 indicates a problem with your Toyota Camry's Vapor Pressure Sensor, which is part of fuel tank vapor circuit (EVAP system). Replacing the EVAP (charcoal canister) will not fix this problem. You will need to replace the Vapor Pressure Sensor. This sensor is part of the EVAP vapor line, and is located before the charcoal canister. Having replaced the gas cap sometimes works... but only if the fault was in fact a defective gas cap. In this case since you have a new gas cap on and the check engine light has not cleared, consider replacing the EVAP Pressure Sensor (also known as the Fuel Tank Pressure Sensor).