[ZODB-Dev] ImportError: cannot import name Interface

Christian Robottom Reis kiko at async.com.br
Wed Aug 25 14:48:59 EDT 2004


On Wed, Aug 25, 2004 at 08:30:55PM +0200, Diez Roggisch wrote:
> Traceback (most recent call last):
>   File "bin/claros_server", line 2, in ?
>     import claros.server.corba
>   File "/home/deets/projects/tmp/claros/trunk/claros/server/corba.py", line
> 19,in ?
>     import claros.domain
>   File "/home/deets/projects/tmp/claros/trunk/claros/domain.py", line 1, in ?
>     import sys, ZODB, ZODB.FileStorage
>   File "/usr/lib/python2.3/site-packages/ZODB/FileStorage/__init__.py", line
> 3,in ?
>     from ZODB.FileStorage.FileStorage \
>   File "/usr/lib/python2.3/site-packages/ZODB/FileStorage/FileStorage.py",
> line39, in ?
>     from ZODB.FileStorage.fspack import FileStoragePacker
>   File "/usr/lib/python2.3/site-packages/ZODB/FileStorage/fspack.py", line
>  32, in ?
>     from ZODB.fsIndex import fsIndex
>   File "/usr/lib/python2.3/site-packages/ZODB/fsIndex.py", line 41, in ?
>     from BTrees._fsBTree import fsBucket
>   File "/usr/lib/python2.3/site-packages/BTrees/__init__.py", line 14, in ?
>     import Interfaces
>   File "/usr/lib/python2.3/site-packages/BTrees/Interfaces.py", line 16, in ?
>     from Interface import Interface
> ImportError: cannot import name Interface

9 out of 10 ZODB-dev subscribers bet you have PythonCAD installed <wink>.

PythonCAD (including the debian package installed) currently adds a .pth
file that adds the contents of the PythonCAD package into sys.path --
and that includes an Interface/ package. If you run "python -v" you'll
notice that it imports the Interface package early on, and because the
Interface package doesn't define a name called Interface, it goes boom.

The only workaround I know of currently is removing PythonCAD, but (hey
Art!) this problem was discussed earlier and a solution should be in the
queue.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331


More information about the ZODB-Dev mailing list