A man pulled down his trousers and attempted to pull down the victims shorts at the weekend.
It happened as the woman, aged in her 20s, was walking through Cowgate at around 1.35am on Sunday 26th July.
She managed to fight off the attacker by kicking him, which is when he escaped the area.
Police are appealing for anyone with information to contact 101, quoting crime reference 36/50408/20.
Alternatively, call Crimestoppers anonymously on 0800 555 111.