[Zope-dev] NASTY error. Why?

Chris Withers chrisw@nipltd.com
Mon, 10 Jul 2000 16:35:34 +0100


Hi,

I'm trying to do a tree walk and copy with:

<dtml-in objectValues>
 <dtml-call "REQUEST['where'][-1].manage_addFolder(id)">
 Created <dtml-var id> in <dtml-var "REQUEST['where'][-1].id"><BR>
 <dtml-if "meta_type=='Folder'">
   <dtml-call "REQUEST['where'].append(this())">
   <dtml-var iterate>
   <dtml-call "REQUEST['where'].pop()">

...etc...

but I get the following truly horrible error from the manage_addFolder

any ideas?

Chris

Error Type: TypeError
Error Value: read-only character buffer, Python Method

Traceback (innermost last):
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 214,
in publish_module
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 179,
in publish
  File /usr/local/zope/2-1-6/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
    (Object: ElementWithAttributes)
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 165,
in publish
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/mapply.py, line 160,
in mapply
    (Object: start)
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 102,
in call_object
    (Object: start)
  File /usr/local/zope/2-1-6/lib/python/OFS/DTMLMethod.py, line 150, in
__call__
    (Object: start)
  File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
    (Object: start)
  File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_With.py,
line 148, in render
    (Object: o-e-s)
  File /usr/local/zope/2-1-6/lib/python/OFS/DTMLMethod.py, line 146, in
__call__
    (Object: iterate)
  File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
    (Object: iterate)
  File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_In.py, line
691, in renderwob
    (Object: objectValues)
  File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_Util.py,
line 335, in eval
    (Object: REQUEST['where'][-1].manage_addFolder(id))
    (Info: REQUEST)
  File <string>, line 0, in ?
  File /usr/local/zope/2-1-6/lib/python/OFS/Folder.py, line 119, in
manage_addFolder
    (Object: ElementWithAttributes)
  File /usr/local/zope/2-1-6/lib/python/OFS/ObjectManager.py, line 231,
in _setObject
    (Object: ElementWithAttributes)
  File /usr/local/zope/2-1-6/lib/python/OFS/ObjectManager.py, line 200,
in _checkId
    (Object: ElementWithAttributes)
  File /usr/local/zope/2-1-6/lib/python/ts_regex.py, line 139, in match
TypeError: (see above)