M3: Debugging and Error Handling

Debugging and Error Handling


Module 3 is on debugging and error handling. Which I will be doing alot in my future since I tend to forget colons and letters. Most Errors are syntax related which can be addressed with debugging processes but there are common Geoprocessing errors that crop up. We explored using the try-except method for working through some of those issues. 

Script 1

Found 3 errors but 2 of them concerned the same missing letter issue. 

Script 1


Script 2

Found 6 errors.

Script 2


Script 3

Took a couple of attempts to get the Try statement in the right place.

Script 3


Flowchart for Script 3, Part A



I didn't have time this week to actually fix the script and see if it prints the layers or if it is just "printing" in map. If it actually prints out the layers then the I would have added another print statement on the true side. 
But also - if it doesn't actually print (I can't think of the correct way to word this) do we still include the print statement? 
I'll have to research all this more when I can.

























Notes

I know I sound like a broken record but I was familiar again with the concepts this module so after the readings, lecture, and exercises I did not really struggle with much. 

I didn't have this issue this time but I noticed someone in the discussion did and it was a nice reminder that a script will not run if its being used in another application. 




*Studying GIS/IT.
Like I mentioned, I didn't have a lot of time for tinkering about this module. But it's because I am putting all my brain power towards my CompTIA Network+ Exam on Wednesday. 

Hopefully next week I will be certified and can completely focus back on GIS until July 1st when Security+ starts (yea, going for the Trifecta. Certified in A+ during the Spring Semester)







Comments