[Zope] Python traceback offsets?
Ben Avery
ben@thesite.org
Thu, 14 Nov 2002 20:25:10 +0000
there are 9 header lines in a python script, so add 9 to the line number
given and look there.
well, that's always worked for me, anyway :)
ben
Skip Montanaro wrote:
> I added <dtml-var error_tb> to my standard_error_message so I could get
> tracebacks. Unfortunately, the information displayed isn't always enough to
> tell me where the error actually occurred (e.g.,
> "AttributeError... __call__" doesn't mention any actual objects in my
> script), and the line numbers are off by some amount because of the missing
> function stuff and the boilerplate comments placed at the head of the
> script when I edit it via ftp.
>
> Is there some sort of fixed offset I can use to calculate the actual line
> number of the error in my Python script? Alternately, can I tweak the
> <dtml-var error_tb> stuff to get a complete traceback which includes Python
> source?
>
> Thx,
>