[Zope] creating instances of ZDiscussions programatically

Dennis Allison allison@sumeru.stanford.EDU
Fri, 26 Jul 2002 13:39:31 -0700 (PDT)


On Fri, 26 Jul 2002, Dennis Allison wrote:

> A later posting contains all the details...  The ZDiscussions product does
> not inherit from ObjectManager--and I suspect it should.  Is this
> my problem?  I've looked at the implementation and am passing everything 
> that appears to be needed...
> 
Applying Dieter's good advice, I still encounter problems.  The ZClass
with its Python base classes does not inherit from ObjectManager.  When I 
try to add that in by reconstructing the class, I get the diagnostic
appended below when I try to create the inner class whether it inherits 
from ObjectManager or not.

What's happening?

-----------------

Zope Error

Zope has encountered an error while publishing this resource.

Error Type: TypeError
Error Value: loop over non-sequence

Troubleshooting Suggestions

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.

For more detailed information about the error, please refer to the HTML
source for this page.

If the error persists please contact the site maintainer. Thank you for
your patience.

Traceback (innermost last):
  File /var/zope/lib/python/ZPublisher/Publish.py, line 150, in
publish_module
  File /var/zope/lib/python/ZPublisher/Publish.py, line 114, in publish
  File /var/zope/lib/python/Zope/__init__.py, line 159, in
zpublisher_exception_hook
    (Object: methods)
  File /var/zope/lib/python/ZPublisher/Publish.py, line 98, in publish
  File /var/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply
    (Object: manage_addZClass)
  File /var/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object
    (Object: manage_addZClass)
  File /var/zope/lib/python/ZClasses/ZClassOwner.py, line 42, in
manage_addZClass
    (Object: methods)
  File /var/zope/lib/python/ZClasses/ZClass.py, line 146, in
manage_addZClass
    (Object: methods)
  File /var/zope/lib/python/ZClasses/ZClass.py, line 271, in __init__
    (Object: ZDItem)
TypeError: (see above)