Catch ProgrammingError from pysqlcipher too.

Related to #5130.