AnsweredAssumed Answered

Arcpy - FeatureClassToFeatureClass

Question asked by trillevine on Nov 25, 2015
Latest reply on Nov 26, 2015 by trillevine

Hello All,

 

I have a dictionary with a list of feature class paths (keys) and destination feature datasets (values) that I'm trying to use to do a batch FeatureClassToFeatureClass operation with.  No matter what I've tried, however, I keep getting the same error when I run the script:

 

 

Here is the code I'm running to do this:

 

for key, value in FCFDdict.iteritems():
        inFC = str(key)
        destination = str(value)
        outFC = str(os.path.basename(key))
        arcpy.env.workspace = destination
        arcpy.FeatureClassToFeatureClass_conversion(inFC, destination, outFC)

 

My dictionary is populated with unicode strings, and looks like this:

 

{
u'C:\\Scripts\\Redefine Projection\\MyGeodatabase.gdb\\FD_A\\infotafeln_1': u'C:\\Scripts\\Redefine Projection\\MyGeodatabase.gdb\\FD_A_redefined', 
u'C:\\Scripts\\Redefine Projection\\MyGeodatabase.gdb\\FD_B\\sielhautproben_2': u'C:\\Scripts\\Redefine Projection\\MyGeodatabase.gdb\\FD_B_redefined', 
u'C:\\Scripts\\Redefine Projection\\MyGeodatabase.gdb\\FD_B\\infotafeln_2': u'C:\\Scripts\\Redefine Projection\\MyGeodatabase.gdb\\FD_B_redefined'
}

 

Anyone out there have any idea what I'm doing wrong here?  I've also tried feeding FeatureClassToFeatureClass the key's basename, to no avail.  Any feedback is greatly appreciated!

Outcomes