← the print pack · the plan A4 · press Ctrl/Cmd + P

Stick this to the wall

Errors, and what they mean

Five red messages he will meet in the first ten weeks, in plain English. Children quit at red text because they read it as failure. It is not — it is the machine explaining itself.

SyntaxError

You have written something Python cannot read at all.

Look at the line it names, and the one above it. Nine times in ten it is a missing : at the end of an if or a for, a missing ), or a quote mark that was opened and never closed.

NameError

You used a name the computer has never been told about.

Either it is spelled differently from where you made it (score and Score are two different things), or you are using the box before you have filled it.

IndentationError

The spaces at the start of the line are wrong.

Everything that belongs inside a loop or an if must be pushed in by the same amount. Pick Tab or spaces and never mix them in one file.

command not found

The terminal has no program with that name.

Check the spelling first — this is a typo far more often than anything else. If the spelling is right, the program is simply not installed on this Pi yet.

Permission denied

You are allowed to ask, but not allowed to do that.

This usually means the command needs sudo in front of it. sudo means “do this as the owner of the machine” — so stop and read the command once more before you press Enter.

Read it out loud, left to right, together. Every Python error ends with the file name and the line number where it gave up. That is a map, not a telling-off. Find the line, look at the one above it, and fix one thing at a time.
Errors, and what they mean · term one onwardskrishpi.sreeb.dev