PHILADELPHIA — Bill Cosby's lawyers have asked a Pennsylvania court to overturn the actor's conviction and three- to 10-year prison sentence because of what they call a string of errors in his sex assault case.

The defense motion argued that trial Judge Steven O'Neill erred in declaring Cosby a sexually violent predator who must be imprisoned to protect the community. Lawyers called the sentence more punitive than necessary, given the standard two- to three-year guideline range for the crime and the fact Cosby is 81 and blind.

They also said the trial evidence never proved the encounter with accuser Andrea Constand took place in 2004, and not 2003, or that Cosby was arrested within the 12-year time limit.

Cosby was arrested on Dec. 30, 2015, and was convicted at a second trial this April. He has been in a state prison near Philadelphia since the Sept. 25 sentencing, when the judge refused to let him stay out on $1 million bail pending appeal. Given his fame, wealth and use of drugs to molest the accuser, the judge said, Cosby could remain a threat to other women.

The defense motion said O'Neill improperly considered the trial testimony of five other accusers in sentencing Cosby, instead of limiting that "prior bad act" testimony to the question of his guilt or innocence. O'Neill, in explaining the sentence in court, told Cosby he considered "voices from the past, your past," and that he "heard their voices loud and clear," the defense said.

The lawyers also challenged the state's sex offender laws, which have been revised several times amid challenges they are unconstitutionally vague. The law requires judges to find that a sexually violent predator has a "mental abnormality," a term they said has no legal or psychological meaning, yet subjects defendants to lifetime counseling and police registration.

The defense motion, dated Friday, was posted to a public court docket in the case over the weekend. Kate Delano, a spokeswoman for the Montgomery County District Attorney's Office, said the office will file a response.

The motion was filed by lawyer Peter Goldberger, a top appellate lawyer in the region, and Joseph P. Green Jr., who handled Cosby's sentencing after more than a dozen other lawyers on the case had come and gone. A former appellate lawyer on the case is suing Cosby over what he called more than $50,000 in unpaid bills.

The defense also complained that an audio recording played to jurors of a 2005 conversation between Cosby and Gianna Constand, the mother of accuser Andrea Constand, was "not authentic." They said they did not make the discovery until an expert review after the trial.

District Attorney Kevin Steele has dismissed that as a legitimate appeal issue, saying it's been widely known that Gianna Constand started her recorder after the call began. She had called Cosby to get answers about what happened to her daughter after Andrea Constand disclosed the assault a year later. The family went to police, who suggested they try to record Cosby.

During the call, Cosby acknowledged engaging in "digital penetration" after giving her daughter pills he would not identify, and offered money for Andrea to attend graduate school, Gianna Constand testified.

"If that's what they've got, it's beyond a Hail Mary," Steele said at the sentencing, as Cosby's lawyers sought to keep Cosby free on bail over the tape recording. O'Neill instead had Cosby led out of the courtroom in handcuffs.