[ZPatterns] excessive recursion error

joachim@beehive.de joachim@beehive.de
Mon, 2 Jul 2001 16:08:05 +0200 (CEST)


Hi,

I have setup a Specialist with pure ZClass storage and a Catalog. The
cataloging is done in a SkinScript following the suggestion of Steve
Alexander like this:

WITH SELF COMPUTE
    ST='%s %s' % (Question, Answer)
WHEN OBJECT ADDED CALL
Catalog.catalog_object(self, _.string.join(self.getPhysicalPath(),'/'))
WHEN OBJECT DELETED CALL
Catalog.uncatalog_object(_.string.join(self.getPhysicalPath(),'/'))
WHEN OBJECT CHANGED CALL
Catalog.uncatalog_object(_.string.join(self.getPhysicalPath(),'/')),
Catalog.catalog_object(self, _.string.join(self.getPhysicalPath(),'/'))

when I create many instances in this specialist with a dtml-script like this:
jonly the relevant parts shown.
....
<dtml-call "REQUEST.set('Answer','stressanswer')">
<dtml-call "REQUEST.set('AnswerLanguage','English')">

<dtml-in "_.range(800,1200)">
<dtml-call "REQUEST.set('QId','s002_'+
_.string.zfill(_.str(_['sequence-item']),3))">
<dtml-var QId><br>

<dtml-call "REQUEST.set('ni',newItem(QId))">
...
<dtml-call "REQUEST.set('InquirersName','Mr. ' + QId)">
...
<dtml-call "ni.propertysheets.Basic.manage_changeProperties(REQUEST=REQUEST)">

the ZClass for this Specialist has a propertysheet "Basic".

Now sporadically I get this

<P>
  <STRONG>Error Type: SystemError</STRONG><BR>
  <STRONG>Error Value: Excessive recursion</STRONG><BR>
</P>

Traceback (innermost last):
  File /usr/local/Zope-2.2.1-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /usr/local/Zope-2.2.1-src/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/local/Zope-2.2.1-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook
    (Object: ProviderContainer)
  File /usr/local/Zope-2.2.1-src/lib/python/ZPublisher/Publish.py, line 175, in publish
  File /usr/local/Zope-2.2.1-src/lib/python/Zope/__init__.py, line 235, in commit
  File /usr/local/Zope-2.2.1-src/lib/python/ZODB/Transaction.py, line 251, in commit
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line 91, in commit
    (Object: GTMixin)
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line 194, in _objectAdded
    (Object: GTMixin)
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line 240, in _notify
    (Object: GTMixin)
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Expressions.py, line 122, in eval
  File /usr/local/Zope-2.2.1-src/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval
    (Object: Catalog . catalog_object ( self , _ . string . join ( self . getPhysicalPath ( ) , '/'  )  ))
    (Info: _)
  File &lt;string&gt;, line 0, in ?
  File /usr/local/Zope-2.2.1-src/lib/python/Products/ZCatalog/ZCatalog.py, line 383, in catalog_object
    (Object: Traversable)
  File /usr/local/Zope-2.2.1-src/lib/python/ZODB/Transaction.py, line 251, in commit
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line 91, in commit
    (Object: GTMixin)
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line 194, in _objectAdded
    (Object: GTMixin)
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Agents.py, line 240, in _notify
    (Object: GTMixin)
  File /usr/local/Zope-2.2.1/lib/python/Products/ZPatterns/Expressions.py, line 122, in eval
  File /usr/local/Zope-2.2.1-src/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval
    (Object: Catalog . catalog_object ( self , _ . string . join ( self . getPhysicalPath ( ) , '/'  )  ))
    (Info: _)

and so on. Sporadically means, I could add up to 400 instances then when
adding 400 - 800, I got this error. Then I had to restart Zope, listed the
items -> no items were added tried again to add 400 - 800, this time without error.
Then added 800 - 1200, again: the same error, no items added
Zope restartet, tried again 800 - 1200 --> no error
tried 1200 - 1600 --> no error
tried 1600 - 2000 --> no error
tried 2000 - 2400 --> error

Can someone explain this ?



Mit freundlichen Grüßen

Joachim Schmitz

-----------------------------------------------------------------
beehive elektronische medien GmbH          http://home.beehive.de
-----------------------------------------------------------------