[Zope] I really screwed up.

Joe Goldthwaite joe at goldthwaites.com
Mon Mar 22 11:51:39 EST 2004


Hi all,

I made the mistake of trying to upgrade a working system from Zope 2.6.2 to
2.7.0 one week before I demo to the company officers.  I also decided that
rather than have multiple copies of python all over the place, I'd just have
one and I'd point my development tools over to it.

I screwed up Visual Python so bad, it no longer runs any python code.  I got
around that by installing Komodo so I can now at least debug my program.

Here's my problem.  I'm using external methods extensively.  My Zope
instance is c:\website.  My external modules are in c:\website\extensions.
I've got two modules; Externals.py and BarsDB.py.  Externals.py imports
BarsDB.  This was all working on Zope 2.6.2.  Now I get an error message
"AttributeError: 'module' object has no attribute 'BSConnection'" It's
strange.  It looks like its finding the module but not actually getting any
of the names.  It's also not generating any errors on the import command. (I
was having that problem before with 2.6 but I got it working.)

I wrote this little function to test

import BarsDB

def index_html(REQUEST):

	return "\n".join(dir(BarsDB))

When I run this from my development environment (Komodo at the moment),
everything shows up. I get this list;

AcctDesc
BSConnection
DataLine
DataLines
... etc, etc.

When I run the same routine from Zope, I get;

__builtins__
__doc__
__file__
__name__


That's it.  I thought that maybe Zope wasn't finding my BarsDB module and
was generating a default empty module instead of generating an error telling
me it couldn't find the module.  I added a line c:\website\extensions to the
Zope sys.path variable and it shows up correctly when I look at the debug
information.

Anyone have any ideas what could cause this?  It seemingly finds my module
but doesn't process it.




More information about the Zope mailing list