I recently bought a 2009 Prius with 133k miles and after 2 days, this code P0171 started to pop up and when I checked ODM, it seems that the O2 sensor 1 was at 0 volts the entire time. I just wanted to make sure that the correct solution is to buy a upstream O2 sensor (the expensive one) and then either install it myself or pay a auto shop to install it for me. P0171 is the only code that pops out so I'm hopeful that fixing it will be the end of my car troubles.
Are you sure it's the O2 sensor, not an intake leak after the MAF sensor or vacuum leak? P0171 – System Too Lean (Bank 1) IMHO: pay a shop to do it - don't buy the part. Their part n their labor = their problem if that code comes back. It's called a warranty. If your going to do it yourself; it's located on the exhaust manifold. Most parts store will loan you the correct tool/socket to change it. Match up the stamped part numbers old vs new. Putting in the wrong sensor will trip other codes pointing you in the wrong direction. Good Luck......
Have you checked everything correctly according to this procedure? https://share.qclt.com/%E4%B8%B0%E7%94%B0%E6%99%AE%E7%91%9E%E6%96%AF%E5%8E%9F%E5%8E%82%E8%8B%B1%E6%96%87%E6%89%8B%E5%86%8Cpdf%E6%A0%BC%E5%BC%8F/repair%20manual/04pruisr/05/2054m/cip0171.pdf
I will check this, but I thought that since the OBD shows that my first O2 sensor isn't working at all due to no voltage showing when driving it means that it can only be a problem with the sensor
Correction for compliance with the specified parameters consists of the sensor checking the exhaust from the engine and telling it to add more fuel, or vice versa, reduce the fuel, otherwise the mixture is incorrect. The sensor can make mistakes when it is faulty. But other systems that do not work correctly and transmit their parameters for the primary formation of air and fuel volumes can also make mistakes. Then the sensor only informs that everything is wrong, correct it. Trouble Area: Air induction system Injector blockage Mass air flow meter Engine coolant temperature sensor Fuel pressure Gas leakage in exhaust system Open or short in A/F sensor (bank 1, sensor 1) circuit A/F sensor (bank 1, sensor 1) A/F sensor heater (bank 1, sensor 1) EFI M relay PCV valve and hose PCV hose connection ECM