[albatross-users] Transferring a site

Dave Cole djc at object-craft.com.au
Sun Nov 10 12:20:00 EST 2002


>>>>> "Brian" == Brian Brown <brian at ablelinktech.com> writes:

Brian> First, thanks to Andrew and Greg for lot's of troubleshooting
Brian> suggestions... I figured out what was going on. Albatross and
Brian> mod_python were fine... the issue was with some of my page
Brian> modules that were importing and using StructuredText. I hadn't
Brian> moved that package to the server. Unfortunately, Albatross was
Brian> not passing the error up to apache... it was just returning the
Brian> default "Oops! URL home not found." error, and apache was
Brian> logging a 200 instead of a 404.

In the RandomPageModuleMixin the code traps an ImportError when it
tries to load the page module.  It assumes that the request page
module was the module which could not be loaded.  This is a bad
assumption it seems :-)

Looks like the only was around this is to modify the code

        try:
            self.load_page_module(ctx, page)
        except ImportError:

to this

        try:
            self.load_page_module(ctx, page)
        except ImportError, e:
            if not str(e).endswith(page):
                raise

This unfortunately relies on the formatting of the ImportError
exception.

Brian> There really wasn't any way for me to figure out why it was
Brian> failing.  I was looking at all the code for the umpteenth time
Brian> and saw the "import StructuredText" and bang! I tried putting
Brian> that module on the server. Everything works fine now.

Brian> Is there any way to get those types of error propogated? Of
Brian> course now, I know what these mysterious symptoms mean!

I am going to add code like the above into Albatross.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list