Police found a cannabis farm capable of producing almost £30,000 worth of the class B drug when they went to house with concerns of the safety of a woman.
Officers discovered a sophisticated cannabis growing operation at the house in Castleford as they tried to find Michaela Parker.
The officers heard fans blowing once they were inside the property and then discovered 32 plants in bedrooms.
A carrier bag was also found inside the house which contained £1,100 of loose cannabis.
The plants were capable of producing around £28,000 worth of cannabis.
Parker's fingerprints and the fingerprints of her then partner Alex Bennett were found on the carrier bag.
A credit card in Bennett's name was also found inside the property.
Read more: Partially blind man ignored driving ban and injured elderly couple in head-on crash
Rukhshanda Hussain, prosecuting, said police had been directed to the house on February 12 last year after first going to an address on Teall Close, Castleford.
Miss Hussain said the officers had received a call from ambulance service with concerns for Parker's safety.
Parker was later found in a car park in Seacroft, Leeds, and was taken to hospital.
She was then arrested over the discovery along with Bennett.,
Bennett, of Town Street, Middleton, Leeds, pleaded guilty to producing cannabis.
Parker, of Watling Road, Castleford, pleaded guilty to permitting premises to be used for the production of cannabis.
Read more: Murder trial date set for three men over death of man in Wakefield house fire
The court heard Bennett has a previous conviction for possessing cocaine and producing cannabis.
Stephen Welford, for Bennett, said his client was no longer in a relationship with Parker.
He said Bennett had a new partner who is expecting their first child.
Allan Armbrister, for Parker, said: "There was pressure put on her to allow a person to use those premises and she wasn't strong enough to resist this."
Mr Armbrister said Parker suffered from mental health difficulties and a probation service report described her as vulnerable.
Bennett was jailed for ten months.
Parker was given a community order for 12 months and ordered to take part in a 25-day rehabilitation programme.
Judge Andrew Stubbs, QC, said: "It had all the hallmarks of a successful and well planned cannabis operation."