how to handle errors in python