Aren't you lucky I was passing by?
Here's (what should be) a solution for your problem.
As a few noted, the problem that creates smells is bacteria. You have to get rid of the bacteria.
How to clean a carpet of bacteria:
- best way is to rent out a hot water "steam" carpet cleaner, like
Rug Doctor. You should be able to do this at any good supermarket. Rent the machine for 1 day; it is recommended that you also use the opportunity to shampoo the carpet using Rug Doctor's standard shampoo mixture. Don't bother with their deodorizer; we are going to handle that issue.
If you want to shampoo as well as deodorize (recommended) do the shampooing as per instructions. I used the HOTTEST WATER I could get out of my tap and the "1 cup" extra-soiled shampoo ratio as per the bottle's instructions. Allow carpet to (pretty much) dry (it does not have to be completely dry, just most of the moisture gone) - using a dehumidifier, air conditioner, fans etc. to help is a bonus.
If shampooing figure on a full day to process carpet (shampoo, dry, deodorize, rinse, dry), if no shampoo then this will only take a few hours.
- create deodorizing mixture with 2 gallons plain HOT water with 1/3 cup STANDARD bleach. What I mean by "standard" is not the new "HE" / high efficiency / thick liquid bleaches, as those reduce water content so their ratios will be off. DO NOT CHANGE THE RATIO, and don't worry about making 2 gallons at a time, you will need that amount at least anyway.
- test mixture on a small hidden spot area of the carpet. I had absolutely no problem with this mixture at all but I say "test" as a disclaimer in case you are nervous or have especially sensitive carpet material.
- rinse out steamer's water container and add deodorizer. Use mixture to clean carpet as per standard operating procedure of steamer. If additional mixture is needed I recommend you create more mixture in 2 gallon quantities ONLY to keep ratio.
- let carpet for NO LONGER than 10 minutes, 5 minutes actually recommended but even shorter if test shows problem.
- rinse our steamer's water container and add fresh HOT water, no additives. Use clean water to clean carpet as per standard operating procedure to steamer. Then "revacuum" the area - use the steamer WITHOUT water, just suction only - to remove all excess liquids from the carpet.
- dry carpet AS QUICKLY AS POSSIBLE using fans, open windows, dehumidifiers, air conditioners or room heat as necessary. The faster you dry out the carpet, the less chance for mildew bacteria to grow (although this treatment should prevent that occurrence)
The 2 gallon to 1/3 cup bleach mixture is JUST enough oxidizer to kill off bacteria but NOT enough to damage the carpet in any way (at least in people's experience who have used it). I recommend you DON'T change the mixture ratio, don't leave it on the carpet more than a few minutes and rinse carpet with fresh water to remove oxidizer. If this doesn't work to remove the odor of a carpet...really nothing will.