Fix deprecation warning by changing e.message -> e.args[0]