are you doing this in arcobjects or in ArcGIS Pro?
If the latter, show a screen grab of the dialog for the tool or your python code.
If the former, you should move your question
Thank you Dan I solved it by using a updated version of ArcGIS thank you