Woody Allen said his films were "a cure for insomnia" as he accepted an award at the San Sebastian Film Festival.
Allen is in Spain with his wife Soon Yi
The 68-year old director was given a life-time achievement award at the festival in Spain, on Friday.
Allen, who has made more than 30 films, including Annie Hall and Manhattan, also attended the premiere of his new
Melinda and Melinda.
The film is not competing at the event which sees 19 movies vying for the top award - the Golden Shell.
He received the Donostia prize, which is awarded for a great film personality in recognition of their career, from Spanish director Pedro Almodovar.
Allen said: "When they told me ... they wanted to give me a life-time achievement award I felt I should not really accept because you know, after all, what have I actually achieved?
"I'm not a scientist or a doctor who has discovered some great cure and then I thought about my films and I thought that actually they were a cure for insomnia and I thought that I could accept the award in all conscience."
Melinda and Melinda - starring Radha Mitchell, British actor Jonny Lee Miller and Will Ferrell - is a tragi-comedy.
But Allen, a self-confessed neurotic, says he can only ever focus on the tragedy.
"I have a extremely pessimistic outlook. To me the glass is always empty, not half empty, but completely empty ... For me it's tragic or extremely tragic," he said.
A retrospective of Allen's work, including his acting and writing, is running throughout the nine-day festival.
The festival will also honour Hollywood actors Jeff Bridges and Annette Bening with Donostia prizes for their life's work.
Their latest films are being shown at the festival.
Other highlights include the premiere of Oliver Stone's new documentary on Cuban President Fidel Castro, Looking for Fidel, the follow-up to his 2002 documentary Comandante.