ERROR 999999: Error executing function Failed to execute FeatureClassToFeatureClass

40161
11
08-17-2011 10:52 AM
ChrisBonfiglio
New Contributor
Can anyone tell me about this error. I can run feature class to feature class conversion in model builder and it works fine. But when I try to add it to a python script I get this ERROR 999999: Error executing function Failed to execute FeatureClassToFeatureClass. I have tried importing the python script from model builder and adding the tool from the tool box it errors both ways.

Thank you for any help.
Tags (2)
0 Kudos
11 Replies
PatrickJurgens
New Contributor III
999999 is a generic error message for all nondescript errors. Sometimes when I get this message it is because the file is still being locked somewhere in the background. If you have not already tried this I recommend closing all ArcGIS products, then attempt to run your python script.
0 Kudos
ChrisBonfiglio
New Contributor
Thanks, I have gone as far as to reboot my computer.
0 Kudos
PatrickJurgens
New Contributor III
Then it is not as simple as I suggested earlier.

Is the code very long, could you post it, or part of it?
0 Kudos
ChrisBonfiglio
New Contributor
Here is the part I'm having the problem with.

#
if arcpy.Exists(BuildingDropShadow):
    print "buildingDropShadow is still here"
try:
    #
    #------ Copy_management IS A WORK AROUND NEED TO GET FeatureClassToFeatureClass_conversion TO WORK NEED TO BE ABLE IN THE GEODATABASE SETTING SELECT GEOMETERY FOR SDE
    #
    arcpy.FeatureClassToFeatureClass_conversion(Buildings, BuildingDir, BuildingDropShadow, "", "", "GEOMETRY")
   
#print "Creating rep for buildingDropShadow"
    arcpy.AddRepresentation_cartography(Buildings, BuildingDropShadow, rule_idFieldName, overrideFieldName, geometryEditing, BuildingDropShadowlyr, assignRule)

except Exception, e:
    #
    #------ IF AN ERROR OCCURRED, PRINT LINE NUMBER AND ERROR MESSAGE  
    #
    tb = sys.exc_info()[2]
    print "Line %i" % tb.tb_lineno
    print e.message
   
del BuildingDropShadow
0 Kudos
PatrickJurgens
New Contributor III
I thought I saw the problem, but the problem was actually with my eyes.
I just edited my post to avoid publishing mis-information.
0 Kudos
MathewCoyle
Frequent Contributor
Can you use feature class to feature class without exporting to SDE?

Are you sure all your feature class names are legal? "GEOMETRY" is the database keyword you are using? 9s errors are a pain to track down.
0 Kudos
AndersOlson
New Contributor
I am having the same problem.  Did you figure out how to fix it? 

I am using FeatureClassToFeatureClass to convert a .lyr file into a .shp file.  When I run the process in Model Builder everything is fine, but when I run the script in Python I get the error message: "ERROR 999999: Error executing function. Failed to execute (FeatureClassToFeatureClass)."

I hate this error message, it tells me nothing about what the actual problem is.  I changed my attribute fields to match all the ESRI standards, but that did not fix the problem.
0 Kudos
SerbanMarin2
New Contributor

I got this error when I was running:

arcpy.FeatureClassToFeatureClass_conversion(path, gdbpath\featureDatasetA, name)

Where name matches an existing feature Class from a different dataset (i.e. gdbpath\faetureDatasetB). The really weird thing is if you were to run the tool on the correct dataset:

arcpy.FeatureClassToFeatureClass_conversion(path, gdbpath\featureDatasetB, name)

 

... then no errors occur and the feature class gets overwritten.

BWSCIM
by
New Contributor III

I'm running into the same behavior via ArcObjects.  I want to copy a shapefile into 3 datasets within the same FGDB.  The datasets are created, the first FeatureClasstoFeatureClass geoprocess goes perfect.  The subsequent 2 fail with the following error message:

999999 ERROR 999999: Error executing function.
 -2147467259 Failed to execute (FeatureClassToFeatureClass).

0 Kudos