Finding and understanding errors

In Chapter 9, ArcGIS Enterprise Standards and Best Practices, we talked about logging and how to set up a Python logger with the daiquiri module. Using a daiquiri logger, it is easy to both log to a file and to standard output at the same time, which is great, but, sometimes, in larger scripts, you need a little bit more than just a logger that prints out the errors. Finding where the error occurred in a larger script can sometimes be your biggest challenge. arcpy comes with an array of error messaging tools that work great to provide us with errors related to arcpy, but standalone scripts often need a little bit more related to standard Python errors (those not related to arcpy). This is where the traceback ...

Get Mastering ArcGIS Enterprise Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.