[Zope-dev] Python Product as DataSkin

Michael R. Bernstein webmaven@lvcm.com
Sun, 18 Feb 2001 18:02:17 -0800


"Phillip J. Eby" wrote:
> 
> At 12:51 PM 2/18/01 -0800, Michael R. Bernstein wrote:
> >I have an existing Python Product that I would like to use
> >as a DataSkin in a Rack.
> >
> >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...):

Hmm. I thought I was doing it wrong. 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)

Any ideas?

Michael Bernstein.