[albatross-users] Upgrade problems to albatross 1.10pre2
Sheila King
sheila at thinkspot.net
Wed Jul 9 15:41:11 EST 2003
--On Wednesday, July 09, 2003 3:16 PM +1000 Andrew McNamara
<andrewm at object-craft.com.au> wrote:
> > Anyhow, the next thing I did was try to go to my application,
> > which I had tested this afternoon before upgrading to the latest
> > albatross.
> >
> > I get the following error output when I try to go to the base URL
> > for my application:
> >
> > Template traceback (most recent call last):
> >
> > Traceback (most recent call last):
> > File
> > "/big/dom/xdomain/lib/python2.2/site-packages/albatross/app.py",
> > line 238, in run
> > self.load_page(ctx)
> > File
> > "/big/dom/xdomain/lib/python2.2/site-packages/albatross/randompag
> > e.py ", line 35, in load_page
> > self.load_page_module(ctx, page)
> > File
> > "/big/dom/xdomain/lib/python2.2/site-packages/albatross/app.py",
> > line 372, in load_page_module
> > file, filepath, desc = imp.find_module(name, [dirname])
> > ImportError: No module named login
> >
> > Which is really weird, because the login.py file hasn't moved.
> > The app worked the last time I tried it, and the only thing that
> > has changed, is that I have upgraded albatross.
>
> That's a curly one. I'd suggest putting some debug in before the
> above line in albatross. Write os.getcwd() and dirname to
> sys.stderr. If you don't have access to the web server's stderr
> output, you could write the debug to a file in /tmp, etc.
>
> "dirname" is derived from the module name ("login") and the
> module_path you specified when creating the app object.
>
OK, good suggestions. I have done this, and the output was as follows:
os.getcwd() = /big/dom/xdomain/cgi-bin/qa_auth
dirname = /
cwd looks correct, as that is the directory wherein the cgi file is
stored for the main app file.
I am using the SessionFileAppMixin and there is no place to specify
an alternate directory for the template files (or at least there
wasn't in the previous version).
My class definition and __init__ is as follows:
class qaApp(PickleSignMixin,
Application,
TemplateLoaderMixin,
RandomPageModuleMixin,
SessionFileAppMixin):
def __init__(self, base_url = 'mgr.py',
page_path = '.',
start_page = 'login',
secret = '-=-secret-=-',
session_appid = 'questadmin',
session_dir = './sessions'):
Application.__init__(self, base_url)
PickleSignMixin.__init__(self, secret)
TemplateLoaderMixin.__init__(self, page_path)
RandomPageModuleMixin.__init__(self, page_path, start_page)
SessionFileAppMixin.__init__(self, session_appid, session_dir)
Ah, actually I do see, there is a "page_path" and it is correct. The
pages are all in the same directory with the main app file.
K, so nothing looks wrong to me here. :/
--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org
More information about the Albatross-users
mailing list