Module 2: Debugging and Error Handling



This week's blog focused primarily on the debugging and error finding in codes that were preexisting. To complete the first two parts of the module, I began by opening Spyder and reviewing the code visually. I was able to detect the first few errors in both codes without running the code, as they were issues with the spelling of functions and incorrect case in letters that were predefined variables. I then ran the code for both and looked at initial error messages and the pop up notifications to determine the next issues with the code. I then ran the IPython Debugger, and looked for issues with the code line by line until I could determine where the final issues existed. For The final exercise, I looked at the parts of part A that returned errors, and grouped the parts of the code together that returned errors of the same type, and put a try except message around each type of error message returned. Part A was able to return an error while part B ran, so that the error was bypassed. 

 

Comments