GIS5103 Module 3: Debug & Error Handling
Switching from the heat to the onslaught of rain recently has made me sick again—you could say I've caught a... bug! Speaking of catching a bug, aside from the common cold I've been experiencing, we learned about common Python and geoprocessing errors, as well as general debugging and error handling in Python scripts this week. Troubleshooting can be headache-inducing, but at the same time, oh so rewarding when you can overcome them. Python thankfully makes this process as painless as possible. Again, I'm reminded of how kind Python and its editors can be in identifying what causes a script to fail to run or to break in the midst of a run. This week, we were tasked with three different pre-made scripts this time. For two of the scripts, we were able to fix some errors and ensure they ran. The final and third script, however, required us to use try-except statements to bypass erroneous sections of Part A while still allowing Part B to run. Script 1 - Feature Class Field Name...