Catch ProgrammingError from pysqlcipher too.

Related to #5130.
Merge remote-tracking branch 'ivan-github/bug/programming-error-bis' into develop