Corrected some exception constructs to py3

Should *hopefully* resolve ticket #326