I upgrade to Pro 2.3 this morning and now i am getting this error on line 81 and i didn't change the script at all.
RuntimeError: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
import sys, arcpy, os, fnmatch
from datetime import datetime as d
startTime = d.now()
start_time = time.time()
# Local variables:
print ('Started')
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:/Temp/Scratchworkspace.gdb"
arcpy.env.qualifiedFieldNames = False
arcpy.env.preserveGlobalIds = True
PT1 = "C:/Temp/Scratchworkspace.gdb/Drain"
FieldMapString = '''
DXF_TEXT "DXF_TEXT" true true false 11 Text 0 0 ,First,#, {0}, ACRES,-1,-1;
ACCOUNT "ACCOUNT" true true false 11 Text 0 0 ,First,#, {0}, ACCOUNT,-1,-1;
PIN "PIN" true true false 13 Text 0 0 ,First,#, {0}, PIN,-1,-1;
ACRES "ACRES" true true false 4 Double 0 0 ,First,#, {0}, ACRES,-1,-1;
Instrument "Instrument" true true false 10 Text 0 0 ,First,#, {0}, Instrument,-1,-1;
SiteAddres "SiteAddres" true true false 106 Text 0 0 ,First,#, {0}, SiteAddres,-1,-1;
SiteCity "SiteCity" true true false 32 Text 0 0 ,First,#, {0}, SiteZip,-1,-1;
SiteZip "SiteZip" true true false 10 Text 0 0 ,First,#, {0}, SiteZip,-1,-1;
'''
#print(FieldMapString.format(PT1))
def Layers15(PT1, FieldMapString):
"""pass the variable and the constant into
the function
"""
fieldmappings = arcpy.FieldMappings()
fieldmappings.loadFromString(FieldMapString)
return fieldmappings
def main(args=None):
if args is None:
args = sys.argv
# Process: Feature Class to Feature Class
arcpy.FeatureClassToFeatureClass_conversion(PT1, "C:/Temp/Scratchworkspace.gdb", "PT_ALL","", Layers15(PT1, FieldMapString),"")
print ("Finished")
print ('(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')')
try:
print ('(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')')
except Exception as e:
# If an error occurred, print line number and error message
import traceback, sys
tb = sys.exc_info()[2]
print ("Line %i" % tb.tb_lineno)
print (e.message)