[Zope-dev] Python Product as DataSkin
Michael R. Bernstein
webmaven@lvcm.com
Sun, 18 Feb 2001 23:45:55 -0800
Philip,
I have gone spelunking into the DataSkin class source to try
to find out why subclassing from DataSkin is interfering
with 'normal' (not in a rack) instantiation of the product,
but with no success. Any assistance you could give would be
appreciated.
BTW, I think the first line needs to read:
from Products.ZPatterns.DataSkins import DataSkin
Thanks,
Michael Bernstein.
Michael Bernstein wrote:
>
> "Phillip J. Eby" wrote:
> >
> > At 12:51 PM 2/18/01 -0800, Michael R. Bernstein wrote:
> > >
> > >What do I need to change (import/subclass) in order to use
> > >it in this way?
> >
> > from ZPatterns.DataSkins import DataSkin
> >
> > class MyClass(DataSkin,...all other bases...):
>
> Here is the error and
> traceback from trying to instantiate the modified Product
> (through the standard mgmt interface):
>
> This resource may be trying to reference a
> nonexistent object or variable _v_dm_
>
> The URL may be incorrect.
> The parameters passed to this resource may be incorrect.
> A resource that this resource relies on may be encountering
> an error.
>
> Traceback (innermost last):
> File
> /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
> line 222, in publish_module
> File
> /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
> line 187, in publish
> File
> /usr/local/Zope-2.2.0-src/lib/python/Zope/__init__.py, line
> 221, in zpublisher_exception_hook
> File
> /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
> line 171, in publish
> File
> /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/mapply.py,
> line 160, in mapply
> (Object: manage_addArchiveImage)
> File
> /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
> line 112, in call_object
> (Object: manage_addArchiveImage)
> File /home/webmaven/Products/ArchiveImage/ArchiveImage.py,
> line 46, in manage_addArchiveImage
> (Object: ApplicationDefaultPermissions)
> File /home/webmaven/Products/ArchiveImage/ArchiveImage.py,
> line 79, in __init__
> (Object: ElementWithAttributes)
> File /home/webmaven/Products/ZPatterns/DataSkins.py, line
> 208, in __set_attr__
> (Object: ElementWithAttributes)
> KeyError: (see above)