Select to view content in your preferred language

CopyFeatures_management error while copying feature class

2654
4
01-26-2018 03:24 PM
LauraBusolo2
Emerging Contributor

I have a script that copies at the moment, shapefiles from one source and pastes them as a feature class into a geodatabase. However, I'm getting an error 000732 when I try to copy a feature class to a target geodatabase. It only seems to work for shapefiles. This is the error I get.

and this line of code works for the .shp

arcpy.CopyFeatures_management (input_table, out_feature_class)

Kindly assist. I don't know what the issue could be.

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

Could your provide the input and output names

http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/copy-features.htm

specifies that data conversion is done, and for shapefiles, you need to specify the *.shp file extension.  are you copying a featureclass to another featureclass you want to make sure that the data types of the source is correct and you are specifying a geodatabase as the destination location

LauraBusolo2
Emerging Contributor

Thanks, Dan. That was the problem. For the feature class, I changed the source to be the gdb and not the name of the feature class. It works!

0 Kudos
DanPatterson_Retired
MVP Emeritus

Glad it worked out, Laura.

0 Kudos
LauraBusolo2
Emerging Contributor

I tried to apply the same logic while copying feature datasets, but that doesn't seem to fly.

0 Kudos