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.
CATEGORY: tutor
Comment:
The obvious question for someone not familiar with the Python community would be "post it *where*?".
Posted by Marius Gedminas (2006-11-12)
It's not exactly obvious, but the articles tagged "CATEGORY: tutor" are for a separate FAQ for the python-tutor mailing list (but most items still apply to c.l.python and other foras, of course). I'll add a small blurb to the tutor pages when I find the time. /F