Troubleshooting

Coding errors are inevitable and an expected part of the development process, especially when working with new languages, software packages, or concepts.

When you come across an error, the most important thing to remember is that each error helps you learn. Every time you debug code, you add to your toolkit as a coder.

To enhance your feeling of autonomy while keeping frustration low, follow this troubleshooting hierarchy:

First, spend about 5 minutes trying to fix the error by yourself. You can do it!

  • Start by reading the error report. Try to make sense of it: these reports are designed to help you find your mistake. In Python, the last line of the report is often the most helpful as it identifies the type of error. The report also identifies the line in your code that causes the error.

  • If the cause is not immediately obvious, examine (print) the variable inputs to the line that causes the error: do they look as intended or is something off?

  • Still nothing? Search for the error online (which will likely lead you to StackExchange or GitHub). Or ask an AI assistant (GitHub Copilot Chat, Claude, Gemini, ChatGPT, DeepSeek, etc.) - they have become very good at supporting troubleshooting.

  • Don’t skip this process and rely on AI for all of your thinking. Coding practice is a free self-test - use it! You’ll thank me in the tests.

If this didn’t fix your error, post it on Piazza and take a break! You will receive an answer within 24 hours or less by your classmates or the instructor.

When you post, make sure to:

  • Include the full code of the cell that caused the error (copy & paste).

  • Include the full printout of the error report.

  • Include printouts of the inputs to the line that caused the error.

  • Add a brief description of the troubleshooting steps you’ve tried.

  • You are welcome to post fully anonymously on Piazza. If so, make sure to check your code and error messages for personal information (like usernames or file paths) before posting.

If you prefer not to use Piazza, you may email the instructor <chrnolte@bu.edu>, though posting on Piazza will usually get you the fastest answer.