AnsweredAssumed Answered

AddJoin_management python script error

Question asked by dxc163530_6317 on Dec 3, 2016
Latest reply on Dec 4, 2016 by bixb0012

I have two shape files and want to join both attribute tables with common field. But arcpy throws the following error.

 

arcpy.management.AddJoin(output_feature, "AccountPoi", lstfc1[x1-1], "AccountID", "KEEP_COMMON")

Traceback (most recent call last):  File "C:/Users/dxc163530/PycharmProjects/start_charm.py", line 48, in <module>    arcpy.management.AddJoin(output_feature, "AccountPoi", lstfc1[x1-1], "AccountID", "KEEP_COMMON")  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 5096, in AddJoin    raise e   File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 5093, in AddJoin    retval = convertArcObjectToPythonObject(gp.AddJoin_management(*gp_fixargs((in_layer_or_view, in_field, join_table, join_field, join_type), True)))  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 506, in <lambda>    return lambda *args: val(*gp_fixargs(args, True))arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.The value cannot be a feature classERROR 000840: The value is not a Raster Layer.ERROR 000840: The value is not a Mosaic Layer.WARNING 000970: The join field AccountPoi in the join table AccountPoints is not indexed. To improve performance, we recommend that an index be created for the join field in the join table.Failed to execute (AddJoin). Process finished with exit code 1

Outcomes