GIS Programming Week 3
This week I learned the basics of fixing errors within your Python script, a process called debugging. I was provided with a few scripts that contained several errors, and it was up to me to address the issues and make the script functional. To find the problems in the code to debug them, I first ran the script to see what errors occurred. The error messages in the Python Shell were quite helpful as they told me what type of error it was, as well as the specific line it came from. Most of the troubles were simple spelling or syntax errors, which were easy to fix and help further familiarize me with the proper grammar of Python. I found the entire process quite enjoyable and rewarding. Below is the final output of the first two scripts I fixed, which retrieved shapefile information from a project in ArcGIS pro. For the final script, I was told to not fix any errors found, but to instead employ a "try/except block", a tool used to work ...


Comments
Post a Comment