AnsweredAssumed Answered

AddJoin_management python script error

Question asked by dxc163530_6317 on Dec 3, 2016
Latest reply on Dec 3, 2016 by Dan_Patterson

I have two shape files and want to join both attribute table with common field. But arcpy throws the following error., "AccountPoi", lstfc1[x1-1], "AccountID", "KEEP_COMMON")Traceback (most recent call last):  File "C:/Users/dxc163530/PycharmProjects/", line 48, in <module>, "AccountPoi", lstfc1[x1-1], "AccountID", "KEEP_COMMON")  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\", line 5096, in AddJoin    raise e   File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\", 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\", 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