On Tue, May 18, 2010 at 6:12 PM, ben <mr.benw...@gmail.com> wrote:
> Hi All,
>
> After a recent svn update to my copy of Django/trunk I’ve been getting
> a persistent error relating to module loading (see below). I am able
> to create the same error from many but not all views/requests.
>
> Interesting, when I run my code against a slightly older version of
> Django trunk (at Rev. 13079) I don’t get these errors.

> Is this a bug, or have I missed some backwards incompatible change?

It's certainly possible you've found a bug. The module that is raising
errors was subject to a number of changes in the last days of 1.2
preparation, and while we've added lots of tests to make sure module
loading works as expected, it's possible we've missed some edge cases.

There is one thing that is a little suspicious. Your stack track
contains the following at the end:

File "/django/utils/module_loading.py", line 12, in
module_has_submodule
   # zipimport.zipimporter.find_module is documented to take

This indicates that there is some confusion over exactly what code is
running. Line 12 of module_loading.py in 1.2-final is a call to
find_module, not a comment about zipimport. The first step in
debugging this will be to purge all your .pyc files in case some
timestamp problems are causing some stale code to execute.

If you still see the problem, the next thing we need to know is
exactly what is being imported, from where -- and most importantly --
by what. Assuming the line numbers in the stack trace are correct, the
block of code that you are tripping over is a walk through
sys.meta_path, which suggests that you are using a custom module
loader of some kind. We're going to need lots of details on exactly
what your stack is doing - how you are storing modules, how they are
being loaded, any special cases you may have, etc.

The stack trace you've given us looks like it's been cut from a
standard Django 500 page; if this is the case, it would be helpful to
have all the local stack information from the last stack frame -- all
the local variables, as well as anything you can furnish about
sys.path and sys.meta_path. Ideally, this will lead to a simple test
case where you can give us the exact conditions under which the
problem arises.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to