In this week's module, we learned how to about debugging and error handling the scripts. Script 1 was quite easy to fix since we were only fixing two exceptions. Script 2 was a little bit tricky when I got the df.pantoextent part, I was able to fix the error by using the defined syntax of extent into the parentheses next to the df.pantoextent. Script 3 was took a little bit more time to do since we had to apply the try-expect statement to the script. Pages 242-243 were somewhat help with getting the general idea of the placement of the try-except statement should be located within the script.
Notes:
1.
Delete
the ‘mapdoc.save(),’ ‘del mapdoc,’ and lyrlist scripts so that the try-except
statement can run correctly.
2.
Make
sure to indent the if statement after the for statement because an syntax error
will show saying ‘expected an indented block’
No comments:
Post a Comment