[Zope-Coders] Problem with importing ZCatalog in 2.7
Fred L. Drake, Jr.
fred@zope.com
Fri, 18 Apr 2003 11:35:37 -0400
Andreas Jung writes:
> while trying to import the ZCatalog Zope 2.7 raised an ImportError for
> "Factory".
> Any ideas what's going on here since this worked in the past?
Ok, I don't think this one was my fault after all. ;-)
Appearantly part of the traceback was cut off at some point (perhaps
an exception was caught and then something else was raised). Here's
an indication of the low-level problem:
>>> import App.Product
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/fdrake/projects/Zope/Zope2/lib/python/App/Product.py", line 37, in ?
import Globals, OFS.Folder, OFS.SimpleItem, os, Acquisition, Products
File "/home/fdrake/projects/Zope/Zope2/lib/python/Globals.py", line 23, in ?
import Acquisition, ComputedAttribute, App.PersistentExtra, os
File "/home/fdrake/projects/Zope/Zope2/lib/python/App/PersistentExtra.py", line 15, in ?
from Persistence import Persistent
ImportError: cannot import name Persistent
Essentially, someone isn't importing ZODB soon enough. I'm not sure
just where the best place is to add the import; App.PersistentExtra is
expecting that it's already done.
-Fred
--
Fred L. Drake, Jr. <fred at zope.com>
PythonLabs at Zope Corporation