runNamedQuery returns None on all failures?

Try catching exceptions like this: