[Tutor] MemoryError
Alan Gauld
alan.gauld at freenet.co.uk
Thu Dec 9 00:02:18 CET 2004
> Traceback: <usual bit about in module..>
>
> Line 39: seg=codeSt[element:endInd+len(endStr]
> MemoryError
>
> Hehe. Helpful, no?
Sometimes seeing the whole traceback gives clues as
to whats throwing the wobbly, without the full stack
its hard to tell.
However before worrying about that I'd add a print
statement to print out all those values:
codeStr
element,
endInd
len(endstr)
I suspect the memory error might be an indexing error,
running off the end of the string or similar... But lets
see those values at the point of failure.
For your own benefit it might be easier just to use the debugger,
just set a breakpoint on the line then check the values when the
debugger stops...
Alan G.
More information about the Tutor
mailing list