Doesn't seem to get old...
I have the same problem, AddRuleToTopology_management is returning with ERROR 999999, even though topology is set with full path, and so is the feature class.
arcpy.env.workspace = gdb
topo_path = os.path.join(gdb, fd, topo)
fc_path = os.path.join(gdb, fd, fc)
arcpy.AddRuleToTopology_management(topo_path, "Must Not Intersect (Line)", fc_path)
All paths are actually correct and of type String, but I always get 999999 in my face. That's in a stand-alone script I am developing in Eclipse. ArcGIS is in version 10.5
When debuging then I can see the error is raised in line 16214 in the management.py file. Since I went step by step through the process I was able to confirm that all paths went correct through the gp_fixargs() function, and optional argument not given have been also correctly taken of the arguments list.
I assume the process is failing in the subsequent run of gp.AddRuleToTopology_management().
--> AddRuleToTopology
16208 from arcpy.geoprocessing._base import gp, gp_fixargs
16209 from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
16210 try:
16211 retval = convertArcObjectToPythonObject(gp.AddRuleToTopology_management(*gp_fixargs((in_topology, rule_type, in_featureclass, subtype, in_featureclass2, subtype2), True)))
16212 return retval
16213 except Exception, e:
16214 raise e
- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!