We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

I need help; I'm getting an error in my program. What should I do?

If you are getting an error in your Python program that you don’t understand, post the error message and any relevant code. Copy and paste the entire error message into your email, including the traceback. Don’t paraphrase the error message. The error message has details that can help resolve the issue that caused the error.

A complete traceback starts with the line Traceback (most recent call last) and ends with a line that describes the specific error. An example:

Traceback (most recent call last):
  File "myprogram.py", line 42, in ?
    data = myfunc("myfile.txt")
  File "myprogram.py", line 25, in myfunc
    f = open(filename)
IOError: [Errno 2] No such file or directory: 'myfile.txt'

The filenames and source code lines may often provide important clues.