My code is as follows:
Essentially, I have one table in my database that is not able to convert into my FGDB. When I run on command line, I am able to get an error message of:
WARNING: Failed to convert Database Connections\DB.sde\Tablexxx. ERROR 999999: Error executing function.
Failed to execute (CopyRows).
But i am not able to print/write this error message to console (via print statement) or to a log file (via log.write). It seems that in my code, the except statements are not even being reached, even though an error is occuring?
arcpy.AddError
only functions with an ArcGIS script tool or Python toolbox tool. Is this a stand-alone script?print
does not work within the ArcGIS platform. You wantarcpy.AddMessage
or its siblings,arcpy.AddWarning
,arcpy.AddError
. Just for grins, themessages
object in Python toolbox usesmessages.addMessage
(lowercasea
inadd
) andmessages.addWarningMessage
andmessages.addErrorMessage
(gotta stay on your toes)