I have a class that calls
traceback.extract_stack()
in its __init__()
, but whenever I do that, the value of traceback.extract_stack()
is []
.
What are some reasons that this could be the case? Is there another way to get a traceback that will be more reliable?
I think the problem is that the code is running in Pylons. Here is some code for a controller action:
def test_tb(self):
import traceback
return a.lib.htmlencode(traceback.extract_stack())
It generates a webpage that is just
[]
So, I don't think it has anything to do with being in the constructor of an object or anything like that. Could it have to do with an incompatibility between some kinds of threading and the traceback module or something like that?