stop catching all exceptions, just catch ValueError