exception valueerror patch