There are tons of posts linking to this error however, none of the solutions appear to fix my problem.I have tried:1) Repairing ArcGIS102) Manually registering the 360.dll3) Modifying my python script to take advantage of different gp tools. However, the script crashed after 90-110 iterations (does not make it out of the loop).I have tried deleting intermediate data, running on multiple machines etc.The original code I was worked off of is here:http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00100000002q000000.htm Note: the orginal code verbatim also crashed. Any suggestions would be great the code and error are attached.
# Import system modules
import arcpy
from arcpy import env
# Declarations
environments = arcpy.env
management = arcpy.management
# Set gp parameters
environments.overwriteOutput="true"
environments.workspace = "D://BANANA_DGN//Raw//Data_Jan2011//DGN_Baseline"
output = "D://BANANA_DGN//Baseline//Baseline.gdb//MTM//"
# Declare datasets into a variables & Create a value table that will hold input feature classes for merge
datasets = arcpy.ListDatasets()
valuetbl = arcpy.ValueTable()
featurecount = 0
# Loop through datasets and create layers which are then merge into a common feature class.
try:
for dataset in datasets:
layername = "DGN_"+str(featurecount)
arcpy.MakeFeatureLayer_management(dataset+"/Polyline",layername)
#featurelayer = management.MakeFeatureLayer(dataset+"//Polyline",layername)
#management.CopyFeatures(featurelayer,output+layername)
valuetbl.addRow(layername)
#management.Delete(featurelayer)
featurecount = featurecount+1
print featurecount
arcpy.Merge_management(vTab, output+"Polylines")
print "Complete!"
except:
print "Error!"
print arcpy.gp.getMessages()