I have 2 variables created from a previous geoprocesses:

fc = arcpy.JSONToFeatures_conversion("cslf.json", os.path.join("cslf.gdb", "cslf"))
selectFeatures = arcpy.CopyFeatures_management(select, "C:\Workspace\Sandbox\MapChangeProject\selects.gdb\select_{}".format(item))

Both of these layers have viable feature layers that can be added in arcMap. I want to use these 2 variables as the input feature parameters (in_features) for a new feature created with arcpy.Intersect_analysis() like this:

 intersect = arcpy.Intersect_analysis([fc, selectFeatures],"intersects", "ALL", "", "")

However, when I run this, I get the following error: ERROR 000628: Cannot set input into parameter cluster_tolerance. Any suggestions as to how to fix my input parameters? I've tried a few variations (adding ""'s) but I get the same thing.

  • 2
    Check data type of fc and selectFeatures, for example by print type(fc). They might be result objects. You should start specifying parameter names. If you do you dont need to provide empty strings and you are certain what parameter you are referring to. For example: arcpy.Intersect_analysis(in_features=[fc,selectFeatures], out_feature_class='intersects')
    – BERA
    Aug 28 '18 at 18:27
  • It only says, <class 'str'>. When I added ""'s to the variable names, I now get this error: ``ERROR 000732: Input Features: Dataset cslf #;selectFeatures # does not exist or is not supported`
    – gwydion93
    Aug 28 '18 at 18:59

I'd suggest assigning your paths to variables and then using those variables in each instance instead of the results of your geoprocessing. I'd also suggest inserting an r, indicating raw string, before your file path as a matter of good habit, though in this specific instance it's not causing a problem.

fc = os.path.join("cslf.gdb", "cslf")
selectFeatures = r"C:\Workspace\Sandbox\MapChangeProject\selects.gdb\select_{}".format(item)

arcpy.JSONToFeatures_conversion("cslf.json", fc)
arcpy.CopyFeatures_management(select, selectFeatures)

intersect = arcpy.Intersect_analysis([fc, selectFeatures],"intersects", "ALL")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.