delayed_loader and psyco: IndexError issue

0 views
Skip to first unread message

Peter

unread,
Feb 11, 2008, 1:33:14 PM2/11/08
to Django users, mal...@pointy-stick.com
I'm having the same issue as seen in this post:
http://groups.google.com/group/django-users/browse_thread/thread/4eb598a52fee2d14/49cd8b7eae6bd72e?lnk=gst&q=delayed_loader

I'm getting an IndexError: "list index out of range" in
delayed_loader.py when it tries to make the call:

caller = traceback.extract_stack(limit=2)[0][2] (on line 35)

This happens in a view when I'm calling "return
render_to_response(...)", where the view imports another file that is
using psyco.

When I catch the error and look at str(traceback.extract_stack()), I
get "[]"

When I turn off psyco, I do not get the error.

Also, I'm currently using Django revision: 6398

Does anyone know if there is a work around to this, or if it has been
handled in a newer django update?

Thanks.

Malcolm Tredinnick

unread,
Feb 12, 2008, 12:31:34 AM2/12/08
to Django users

You really should be able to check yourself if there's been an update.
Run "svn log" on that file and see if there's been any updates. :-)

Still, I can reveal the ending of the story: no, no changes have been
made. The original thread is actually a pretty good example of why
reporting bugs on the mailing list and not opening a ticket is a good
way to have something not fixed. I didn't get to it immediately, nobody
else did either, and it was forgotten.

So (a) please open a ticket, (b) try to work out what a fix might be.
You'll see from reading the comments in the code why we are doing it the
way it's implemented. So if there's a workaround, that'd be good to know
(and since you use psyco, you're more motivated to find such a
workaround than somebody like me who uses it about once a year),
otherwise what is the magic incantation we can put in that file to tell
psyco not to try and compile that file?

In any case, at least open a ticket so that it won't be forgotten and
somebody can try to work on it.

Regards,
Malcolm

--
Experience is something you don't get until just after you need it.
http://www.pointy-stick.com/blog/

Reply all
Reply to author
Forward
0 new messages