[albatross-users] Upgrade problems to albatross 1.10pre2

Andrew McNamara andrewm at object-craft.com.au
Wed Jul 9 15:16:21 EST 2003


>Unfortunately, there is a problem with running the test programs as 
>directed. I entered
>
>$ make
>
>and got the following error output:
>
>PYTHONPATH=.. python all.py
>Traceback (innermost last):
>  File "all.py", line 14, in ?
>    import unittest
>ImportError: No module named unittest
>make: *** [unittests] Error 1
>
>So, instead I tried this:
>
>$ pythonx all.py

Yes - the makefile ran the wrong python - your solution is the correct
one.  You could also have used "PYTHONPATH=.. pythonx all.py", which
would allow you to run the tests without installing albatross.

>which seemed to work mostly fine. I did get one error result:
[...]
>ServerError: could not connect to session server
>
>----------------------------------------------------------------------
>Ran 92 tests in 0.289s
>
>FAILED (errors=1)
>
>Which, I guess is expected, as I am not running the session server ???

That's right - if you started the session server (doesn't need to be
root), this test would have passed, but there's not really a lot of
point (and your hosts might get upset with random processes listening
on random ports).

>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/randompage.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.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list