Python Try Catch Valueerror