Error Check In Python Code For Rock