The forward compatible syntax from 2.6 plus is: except SomeException as err rather than except SomeException, err