[enh] make pysecstr fail graciously