problems with inspect.stack #38

Open
apollo13 opened this Issue May 31, 2011 · 0 comments

Projects

None yet

1 participant

@apollo13

If someone traverses the stack with inspect.stack one can get ugly errors like this one: http://paste.pocoo.org/show/398237/ 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…

http://apolloner.eu/~apollo13/testing.tar 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