An independent reference for people learning to program from scratch. Not affiliated with the former site on this domain, with companies or with schools; we do not sell courses or promise employment.

Errors

Troubleshooting

Errors are a normal part of programming, not a sign that you are "no good at it". Experienced developers see error messages every day; the only difference is that they know where to look. Most often the cause is simple: a typo, the wrong folder, a different language version, an uncommitted change. This section covers typical beginner situations and the order in which to look for the cause.

An error message is not a verdict — it is a note from the program about where it got confused.

— Editor's note

How this section works: we describe the first steps in general terms, without tying them to specific editors or operating systems. Look up exact commands and setting names in the official documentation for your language and tools.

If it doesn't work

The terminal says the command was not found

Most likely the program is not installed or the terminal does not know where it is. Check that the installation finished, restart the terminal and see whether the program's path is set in your system settings. Sometimes the command is named slightly differently from what you expect — check the documentation.

The program reports a syntax error

The interpreter could not parse the program text. Look at the line it points to and the line before it: the culprit is often an unclosed bracket or quote, a missing punctuation mark, or an extra or missing indent.

The program runs but prints nothing

Check whether the relevant part of the code is actually being called and whether the file was saved before running. Add temporary output in a few places to see how far execution gets, then remove it.

It works for others but not for me

Compare the versions of the language and installed libraries, the operating system and the folder you run the program from. Often the problem is a settings file or a dependency you do not have. A list of dependencies with version numbers in the project itself helps here.

There is a merge conflict in the repository

A conflict means the same lines were changed in two places and the system does not know which version to keep. Open the file, find the marked sections, choose the version you need or combine both, delete the conflict markers and commit the result.

Changes I made have disappeared

Do not panic and do not delete anything yet. If the changes were committed, you can find them in the repository history. If not, check whether you have a different file or branch open, and look in your editor's local history. In future, commit your work more often.

How to track down the cause of an error

  1. Read the whole message

    Do not close the error window right away. Find the error type, the file and the line number, and write down the key phrase.

  2. Reproduce the error

    Make sure the error happens on every run, and note which actions lead to it.

    If the failure only happens with certain input, save that input: it will become your first test.

  3. Recall your last change

    What breaks is most often whatever you touched last. Compare the current version of the file with the one committed to the repository.

  4. Shrink the example

    Remove parts of the code one at a time until the error disappears. The last piece you removed is the prime suspect.

  5. Search for the error text

    Search for the message without your own file and variable names: someone has almost certainly run into common errors before. Check the official documentation too.

  6. Ask, and write down the answer

    If that did not help, ask the community using the template from the guides section. Once you find the cause, add it to your error log.

  • Guides

    Step-by-step guides: setting up, a first script, a first repository, error messages, asking the community. The article catalogue is here too.

  • Tools

    A brand-free beginner's kit: code editor, terminal, interpreter or compiler, version control, repository hosting and a package manager.

  • Questions

    Answers about this reference, learning from scratch and your first hands-on projects.

Sources

  • Git documentation
  • Python documentation

Dates and definitions are taken from official documentation and specifications as of the preparation date. Languages and tools keep evolving, so check the details in current primary sources.