About 40% of the questions that reach support already have the answer written inside the error message. With a way of reading them, nearly all of these are solvable on your own.

Read the stack trace from the bottom

A Python traceback tells you what happened on the last line, and where it happened on the line above it. Read from the top and you wade through the innards of libraries you never wrote; read from the bottom and the information you need comes first.

python
Traceback (most recent call last):
  File "main.py", line 12, in <module>
    total = price * count
TypeError: can't multiply sequence by non-int of type 'str'

Here the TypeError on the last line is the kind, and line 12 above it is the place. That points at either price or count still being a string.

Use the exception name to narrow the family of causes

  • NameError / ReferenceError — you mistyped a name, or used it before defining it
  • TypeError — a type is not what you assumed. Usually a forgotten conversion on input
  • IndexError / KeyError — you are reaching for an element that does not exist
  • SyntaxError — an unclosed bracket or a missing colon. Suspect the line before the one shown

When you search, drop the proper nouns

Include your own filenames and variable names in the query and, unsurprisingly, nobody else has ever hit the same thing. Keep the error name and the library name and nothing else.

If you are still stuck

When you ask for help, write four things: what you are trying to do, the code you wrote, the full error text, and what you have already tried. It cuts the time to an answer by more than half.