ARMED police discovered a cannabis farm at a house in Leeds after being called to a report of a woman being held in the property against her will.
Leeds Crown Court heard officers went to Brompton Grove, Beeston, Leeds, and found cannabis plants growing in every room of the house.
-> Video: Dramatic scene as Land Rover flips upside down and ambulances called to Leeds road
Carmel Pearson, prosecuting, said an allegation had also been made that firearms were in the house.
The officers found a woman hiding in the attic but she confirmed she was not being held against her will.
Miss Pearson said a tent was found in one bedroom containing 30 plants. A total of 20 plants were also found in the attic.
The prosecutor said the plants were capable of producing cannabis with a street value of £9,000.
Tenant Paul Metcalfe handed himself in to police.
-> Car mounts pavement and crashes into Betty's Tearoom in Harrogate
Metcalfe, 48, was interviewed and told officers he had allowed others to use is home to grow the class B drug as he had built up a £4,000 drug debt.
He pleaded guilty to producing cannabis.
Probation officer Jacquie Brook told the court that Matcalfe was now homeless as a result of the offence.
Mrs Brook said the defendant was living in a "tented community" in Leeds and was receiving support from a charity to tackle his drug problems.
Tim Jacobs, mitigating, urged judge Robin Mairs to impose a community-based punishment so Metcalfe can continue to receive help.
Metcalfe was made the subject of a two-year community order. He must also take part in a 25-day rehabilitation requirement.
Judge Mairs said: "Because of the drug debt you had turned your house over to be used by others.
-> Police catch four burglars asleep in stolen car near Leeds
"You have rendered yourself vulnerable.
"You are living in a tented community and are trying to deal with the afflictions that have troubled you for many years. One of these is your drug use."