[Zope] Can not import PersistentMapping

Sean whysean at softhome.net
Fri Jan 23 22:07:00 EST 2004


When I include the following line of code:

     from Persistence.PersistentMapping import PersistentMapping

in my Product, it causes this error when I try to import it:

     AttributeError: 'Persistence.PersistentMapping' module has no attribute
'__basicnew__'

after which I have to restart Zope from the command line, the error
continues to be displayed with every request, so I can not use the
management interface.


This line of code, however, works fine:

     from Persistence.PersistentList import PersistentList

Is this a bug in Zope? I can't imagine why PersistentList would work fine,
but PersistentMapping will not even import. The source code is there for
both, and I have tried reinstalling Zope in case it was a corrupt file or
something, but no luck. I can of course just create my own object with a
normal {}, and use _p_changed=1 as needed, but I wanted to share and see if
anyone else had experienced this problem.

Zope Version  (Zope 2.6.2 (binary release, python 2.1, win32-x86), python
2.1.3, win32)
Python Version  2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)]


--Sean


Complete Error Message:

Site Error
An error was encountered while publishing this resource.

exceptions.AttributeError

Sorry, a site error occurred.

Traceback (innermost last):

Module ZPublisher.Publish, line 150, in publish_module
Module ZPublisher.Publish, line 114, in publish
Module Zope.App.startup, line 174, in zpublisher_exception_hook
Module ZODB.ZApplication, line 61, in __bobo_traverse__
Module ZODB.Connection, line 532, in root
Module ZODB.Connection, line 160, in __getitem__
__traceback_info__: ('\x00\x00\x00\x00\x00\x00\x00\x00',
'((U\x0bPersistenceq\x01U\x11PersistentMappingq\x02tq\x03Nt.}q\x04U\n_contai
nerq\x05}q\x06(U\n_pack_timeq\x07GA\xcb\x97\x14bV\xc2\x9cU\x0bRefreshDataq\x
08(U\x08\x00\x00\x00\x00\x00\x02jPq\t(h\x01U\x11PersistentMappingq\nttQU\x08
ZGlobalsq\x0b(U\x08\x00\x00\x00\x00\x00\x00\x00[q\x0c(U\x05BTreeq\rU\x05BTre
eq\x0ettQU\x0bApplicationq\x0f(U\x08\x00\x00\x00\x00\x00\x00\x00\x02q\x10(U\
x0fOFS.Applicationq\x11U\x0bApplicationq\x12ttQus.')
AttributeError: 'Persistence.PersistentMapping' module has no attribute
'__basicnew__'





More information about the Zope mailing list