[ZODB-Dev] can't undo with FileStorage and ZEO

Andrew Sydelko sydelko@ecn.purdue.edu
Thu, 20 Dec 2001 07:42:35 -0500


Toby Dickenson wrote:
> On Wed, 19 Dec 2001 18:46:52 -0500, Andrew Sydelko
> <sydelko@ecn.purdue.edu> wrote:
> 
> >Hmmm... it didn't work at first, but then I 
> >added . to the sys.path and that failed as well
> 
> You will need to restart your python session after that first import
> failed, since it will have cached that half-imported App.Undo module.
> 
> That could be the cause of the mysterious traceback your first posted;
> it is showing what happens after an import has gone wrong, but not why
> it goes wrong in the first place. I wonder what happened to the
> traceback from the first failed import.....

Here's the traceback from when I added Zope/lib/python to
the PYTHONPATH:

>>> import sys
>>> print sys.path
['', '/data/www/Zope.6/lib/python2.1',
'/data/www/Zope.6/lib/python2.1/plat-sunos5',
'/data/www/Zope.6/lib/python2.1/lib-tk',
'/data/www/Zope.6/lib/python2.1/lib-dynload',
'/data/www/Zope.6/lib/python2.1/site-packages']
>>> sys.path.append('.')
>>> from App.Undo import Prefix
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/data/www/Zope.6/src/Zope-2.4.3-src/lib/python/App/Undo.py",
line 90, in ?
    import Globals, ExtensionClass
  File "/data/www/Zope.6/src/Zope-2.4.3-src/lib/python/Globals.py", line
90, in ?
    import Acquisition, ComputedAttribute, App.PersistentExtra, os
  File
"/data/www/Zope.6/src/Zope-2.4.3-src/lib/python/App/PersistentExtra.py",
line 87, in ?
    from Persistence import Persistent
ImportError: cannot import name Persistent
>>> 

--andy.