AddJoin_management python script error

883
1
12-03-2016 04:14 PM
DineshChalasani
New Contributor

I have two shape files and want to join both attribute table 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
0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus

duplicate https://community.esri.com/thread/186903-addjoinmanagement-python-script-error 

The requirements are the same in Pro or arcmap