problems with inspect.stack #38

apollo13 opened this Issue May 31, 2011 · 0 comments


None yet

1 participant


If someone traverses the stack with inspect.stack one can get ugly errors like this one: This is caused by inspect.stack which tries to match the current linenumber of the code object to a line in the file that's attached to the code object. Now if Jinja is in the stack the code objects will have the html file as filename, which are usually way smaller than the generated pythoncode which was used to compile this code object -- which causes and IndexError. Not sure if you consider that as inspect.stack bug, but it would be great if jinja could somehow work around this… is a small django/jinja/django-debug-toolbar project which shows the problem…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment