[Tutor] Showing code with errors
Alan Gauld
alan.gauld at freenet.co.uk
Mon Feb 20 01:56:55 CET 2006
>>We really need to see the full error plus the actual code
> I had thought I had shown you exactly the code and error message.
You only gave the error text not the fll message. A Python error
message is multi line and looks like:
File "<stdin>", line 2
def g(): pass
^
SyntaxError: invalid syntax
>>>
That shows the file name, the line at fault, the location within
the line as well as the description. If the error ioccurs deep within
a program there will be a full stack trace showing all of the nested
function calls too.
> I did not anticipate that the email programs would clobber
> the indentation.
Sadly it happens all too often.
The best solution is to ensure you send in plain text rather
than HTML or RTF formats. Another trick is to put a character
in front of all blank lines (a dot or hyphen say)
Alan G
Author of the learn to program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list