Debugging

 

Part 1

Part 2

Part 3

For this week's lab, I worked on identifying different types of errors and how to fix them. In part 1, there were two errors to fix. This is were I learned that in order to run Python scripts that involve feature classes or ArcGIS, ArcGIS Pro needs to be initialized, otherwise Python throws an error. Part 1 printed the names of the fields in a shape file attribute table. Part 2 took me a bit longer, since it had more errors to fix. I kept getting OSErrors in this part, but eventually it printed the available shape files in an ArcGIS project, as well as the project's spatial reference. For part 3, I was tasked with making a code run, even with errors. This was done by using a try-except statement were the error was occurring. This allowed the code from part A to run, even with the error, so that part B could run after it. Part A printed an error statement, and part B printed out the name, data source, and spatial reference for each layer. I enjoyed the lab this week because I was able to problem solve and dig a bit deeper into the code to determine the issues. 


Comments

Popular posts from this blog

Waypoints and Positions

Data Quality - Standards

GIS Programming