Module 3: Debug & Error Handling

 

This week's assignment was to modify, correct and fix errors in 3 different scripts. It really helped me strengthen both my Python skills and my understanding of working with GIS layers.

This assignment not only improved my Python scripting for GIS, but also taught me the importance of structured error handling, code readability and visual planning. 

Script 1:


Script 2:


Script 3:


In this script, we were to add a try-except statement to the script, to do so, I wrapped part A and B in its own try block. Inside the except block, the print statement displays a clear error without stopping the entire script. This ensures that even if one part fails, the script continues running and reports the issue.

I am also adding a flowchart of this third script:



Comments

Popular posts from this blog

Module 1- Overview of ArcGIS

Module 5: Data Points and Geocoding

Module 6: Georeferencing, Editing, & 3D.