A man who failed to comply with a community order was described as vulnerable because he lives near an area of Huddersfield notorious for crime.
Shane Smith, of Moor End Road in Lockwood , was convicted of using threatening behaviour in November last year.
Kirklees magistrates sentenced him to a community order with rehabilitation activities and 15 hours at an attendance centre.
But the 23-year-old then missed an office-based appointment on January 9 and then an attendance centre group session on January 13.
He pleaded guilty to failing to comply with the requirements of a community order.
Magistrates were told that Smith has mental health issues and struggles to cope with groups.
His solicitor Mike Sisson-Pell explained that he had not seen his doctor for some time but needed to accept some help.
He added: “He’s a young man who is particularly vulnerable and lives near the notorious Walpole estate.
“There are characters there who aren’t the nicest people in the world and if you’re vulnerable you’re bullied.
“Prison would be the worst place for him to end up and he’s said that he’ll get in touch with his GP and work with probation.”
Magistrates gave Smith a curfew for seven days as punishment for the breach.
He will also have to pay £50 prosecution costs.