Abekus — AI learning and job matching platform logo

Debugging Python Code: From Traceback to Root Cause

  • 173 lessons
  • About 19 hours
  • Self-paced
0%Complete
Guided Mode

Start with lesson 1

173 lessons. The first one is free, no signup needed.

🗺️ Your learning path
Worked example
Traceback anatomy
Exception vocabulary
Chained exceptions

What you'll learn

  • Read tracebacks and chained exceptions bottom to top and locate the failing line and its cause
  • Recognise Python's built-in exceptions and classic gotchas such as mutable defaults and late-binding closures
  • Apply a systematic method: reproduce, minimise, hypothesise, bisect and verify the fix
  • Use print, logging, pdb, breakpoint() and IDE debuggers to inspect running code
  • Debug with pytest and fix import, environment, data, encoding, async and concurrency bugs
  • Find performance problems and memory leaks with cProfile and tracemalloc, and trace regressions with git bisect

About this course

Debugging Python Code: From Traceback to Root Cause teaches a reliable way to find out why Python code fails and to fix the real cause rather than the symptom. The first lesson reads a three-frame traceback that ends in a ValueError, bottom to top, and follows it back to the call that passed the bad value. From there the course covers chained exceptions, the built-in exceptions and what usually causes each, classic Python gotchas such as mutable default arguments and late-binding closures, a systematic method of reproducing, minimising and bisecting, print and logging debugging, pdb and breakpoint(), debugging with pytest, import and virtual environment problems, pandas and encoding bugs, async and concurrency bugs, profiling with cProfile and tracemalloc, git bisect, and checking AI-generated code. The course has 173 lessons and about 1153 minutes of content. Each lesson is a short narrated reading card followed by MCQ practice with an explanation for every answer.

Jobs that ask for Python

4,128 live openings list Python as a required skill.

See all Python jobs ›

Frequently asked questions