Im having an issue with the 99999 Error. Im creating a Topology dataset for each of the featureclasses within a GDB. For some reason my script works for some feature classes and errors on others. I was having an issue with the "add rules" tool, and switched background processing off, which seemed to have fixed that error. However, I now get this unknown error...
Cannot register as versioned on this database. Failed to execute (AddRuleToTopology).
Has anyone had this issue before, before I go and log this with ESRI?
My script:
ws = arcpy.env.workspace = workspace
fc = arcpy.ListFeatureClasses()
log_write("starting to create topologies for {}".format(workspace))
for f in fc:
fc_name = arcpy.Describe(f).name[4:]
log_write("creating topology for {}".format(fc_name))
sr = arcpy.Describe(f).spatialreference
log_write("spatial ref : {}".format(sr.name))
input_dataset = arcpy.CreateFeatureDataset_management(ws, "{}_dataset".format(fc_name), sr)
log_write("dataset created")
new_fc = arcpy.FeatureClassToFeatureClass_conversion(f, input_dataset, fc_name)
log_write("added fc to feature dataset")
topo = arcpy.CreateTopology_management(input_dataset, "Topology", 0.001)
log_write("topology created")
arcpy.AddFeatureClassToTopology_management(topo, new_fc, 1)
log_write("fc added to toplogy")
arcpy.AddRuleToTopology_management(topo, "Must Not Have Gaps (Area)", new_fc)
arcpy.AddRuleToTopology_management(topo, "Must Not Overlap (Area)", new_fc)
log_write("rules added to topology")
arcpy.ValidateTopology_management(topo)
log_write("topology validated")