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

Toby Dickenson tdickenson@geminidataloggers.com
Thu, 20 Dec 2001 10:42:46 +0000


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=20
>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.....

>--andy.
>
># pwd
>/data/www/Zope.6/Zope/lib/python
># /data/www/Zope.6/bin/python
>Python 2.1.1 (#1, Nov 14 2001, 10:57:28)=20
>[GCC 2.95.2 19991024 (release)] on sunos5
>Type "copyright", "credits" or "license" for more information.
>>>> 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
>>>> 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 ?
>ImportError: cannot import name Prefix


Toby Dickenson
tdickenson@geminidataloggers.com